I have a file Test.java
and the following code inside it.
public class Abcd
{
//some code here
}
Now the class does n
Also one other point that many answers missed to point out is that without the public
declaration, the JVM would never know which classes' main method needs to be invoked. All classes declared in one .java file can all have main methods, but the main method is run on only the class marked as public. HTH