Nov 6, 2014

Can a public class MyClass be defined in a source file named YourClass.java?

No. The source file name, if it contains a public class, must be the same as the public class name itself with a .javaextension.

0 comments:

Post a Comment