The .java file is the file for your subclass, when you compile a .java file you get class files (I think) so the .java file and the .class files are in your program directory folder.
Greenfoot makes a game out of different subclasses (.java files) together, these classes usually extend World or Actor but each subclass has it's own file in the program/project directory - that's what all those files are in the folder when you click on your program folder, so you can't have different classes in one .java file because if they are in one .java file then they are in the same class.