one reason I read is that because it is the entry point and invoked automatically from outside as a result of execution of the source file .
Remember, we cannot have a private class. Actually, java syntax allows the public static void main(
String[] a) to reside only in the class that is defined as
public modifier or
no modifier and not private modifier. (note: no modifier is different from private modifier)
note that main() is static, so that, even if we create multiple instances of the class that contains main(), we are going to have only on main() common to all (that is, we can access it without instance).
since main() is being an entry point and follows template design
pattern, in most of the cases it is where you are going to instantiate other classes and you are not going to instantiate the class containing the main method from other classes.
So, i think java developers had this flexibility in mind while developing it.
Thanigaivel S.
[ June 15, 2006: Message edited by: S Thanigaivel ]