Questionsforum
Why main() method is static..? we know JVM uses the ClassLoader class object to load any class

Why main() method is static..? we know JVM uses the ClassLoader class object to load any class



On 2014-06-22 14:34:38.0
Pawan


We know that we can run java code without creating any object, that means JVM need to know the staring point of program, which is main() method. And it is declared as static because we should not be responsible to call main() method using any object, because declared static means, will be called without creating any object.

To know more about this , have a visit to the below link -->

Why main() method is declared as static



On 2014-06-22 15:35:44.0
sushant

copyright@questionsforum.net