Still coming from C++ I find it cumbersome to create many small helper classes and objects. Mostly because I have to have one file per class. I basically have a class like this:
public class mySimpleClass {
public float[] numbers = new float[ 4 ];
}
And then I have this class:
public class myNotSoSimpleClass {
private mySimpleClass;
.
.
.
}
The second class which is not so simple is ok to have in its own file. However, the simple class is connected to the not so simple class and it would be very nice to not have to have those few lines of code in its own file.
So to sum it up, this is what one could do in C++:
public class myNotSoSimpleClass {
private struct mySimpleClass {
float numbers[ 4 ];
} myStruct;
.
.
.
}
Is it possible to embed/use one class inside another class, or the same file? I would just find it easier to work with large projects if I could set up these two classes into one file. Or is Java a strictly one class per file, and that's it, language?