Computer Science, asked by sharikaanan4620, 3 months ago

relationship between java file name and class name

Answers

Answered by sushumna47
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 newrenuandrinatrader
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