John Jai wrote:Yes. Else you will get an error. So if you have 10 classes that are declared public, you will end up with 10 java files.
John Jai wrote:See this recent thread - http://www.coderanch.com/t/555184/java/java/Why-name-public-class-should
Harsha Smith wrote:The answer is yes and no
yes....for the inner public classes defined inside the top class file
no....for the classes defined outside the class that was defined in its own file(class name and file name are the same)