Why main() in java is declared as public static void main?
2610
16-Apr-2011
Amit Singh
16-Apr-2011static - When the JVM makes are call to the main method there is not object existing for the class being called therefore it has to have static method to allow invocation from class.
void - Java is platform independant language therefore if it will return some value then the value may mean different to different platforms so unlike C it can not assume a behavior of returning value to the operating system.