posted 22 years ago
Well, for one, that is the way the java compiler works. And another reason is this is just good design. It makes sense that your .class file really be the name of your CLASS.
What do you mean you have other files where the class names don't match the file name?
I would suspect 2 things.
1. They won't compile
2. You are talking about inner classes. So you would still have your main Class that would be the same name as your File.