0

Did the name of the source file(.Java) and class name of the program should be same in all cases?

17th Aug 2016, 6:05 AM
Anand Subramaniam
Anand Subramaniam - avatar
2 odpowiedzi
0
no it's not necessary suppose your file name is avi.java and class name is hello then while compiling you will have to write javac avi.java when compiled successfully you have to execute by writing Java hello.
22nd Aug 2016, 1:52 AM
Prince Avi
Prince Avi - avatar
0
according to coding standard you should use the same name as that of file name so that other people can also understand by merely looking at the code.
22nd Aug 2016, 1:54 AM
Prince Avi
Prince Avi - avatar