relationship between java file name and class name
Answers
Answered by
0
Answer:
If there is no public class then file name may be different from the class name in Java. In case there is a public class then it is enforced that the file name is same as the public class. ... Having the same name as class name is how the JVM will know which class to load and where to look for entry point (main method).
Answered by
0
Answer:
If there is no public class then file name may be different from the class name in Java. In case there is a public class then it is enforced that the file name is same as the public class. ... Having the same name as class name is how the JVM will know which class to load and where to look for entry point (main method).
Similar questions