Can a public class MyClass be defined in a source file named YourClass.java? Ans. No. The source file name, if it contains a public class, must be the same as the public class name itself with a .java extension. - Study24x7
Social learning Network
15 Dec 2023 10:32 AM study24x7 study24x7

Can a public class MyClass be defined in a source file named YourClass.java? Ans. No. The source file name, if it contains a public class, must be the same as the public class name itself with a .java extension.

study24x7
Write a comment
Related Questions
500+   more Questions to answer
Most Related Articles