Question: In c++, one could simply do something like this:

```
struct GraphObject {
Color color;
double value;
String name;
};

```

However in Java, I can't simply do this, I only see creating a class just for this as an option. What I do not like about that is then I need to drag around GraphObject.java and Graph.java (since Graph will hold an ArrayList of GraphObject. Is there a way to put the object class in with Graph.java or is this simply impossible/bad practice?

Thanks

Answer: 
You could make it a [nested class](http://download.oracle.com/javase/tutorial/java/javaOO/nested.html) if appropriate for your design.
You can do it. If that's the only file you use the class in, it's not a problem. If you use it in other files, it will still work but it's not considered good practice.

Usually you'd do it as an [inner class](http://download.oracle.com/javase/tutorial/java/javaOO/innerclasses.html).