Question about public class:
Code example:
class A { public static void main(
String a[]) {} }
This code in file A.java compiles and runs with:
java A
What is the rule for having a public class in a java file?
I know the difference to <default>, protected and private, but I always thought that you need to have a public class (in this case public class A) when calling main in a Java application.
Any help is appreciated,
Bernd