I tried the following:
public class T {
private static void main(String[] str)
{
System.out.println("test");
}
}
It does not give me any errors at compile time (I am using Eclipse 3.3). When I try to run it, it says "Main method not public". Makes sense.
But I would like to know, why main method should always be public. This method is not called by other classes directly.