+ 2
Why same file name of java program as class name.?
this is not compulsory in my view. but in questions , it's answer is true. please explain.
3 Réponses
+ 11
To know which class contains main().
+ 3
but we can compile the program with other name also. there is no problem. But while running the program we need to run with the class name which has java.
+ 2
It is important when you use imports and packages
as they don't refer directly to the class name but the file-structure