I know that there were plenty of questions like this, but in all of them, the answers were "you cannot run a Java program with main method in a non-public class". (What if main method is inside "non public class" of java file?)
However, I tried such a situation in NetBeans, and it ran perfectly fine. Why?
Is having a main in a public class a convention or a strict rule?