Why main() method is static
807591Jun 20 2008 — edited Jun 20 2008By defining main() method as static, JVM can invoke it without creating object for the enclosing class. But, JVM can create an object for the corresponding class and can invoke the main method then? Is there any strong reason for this?
The reason I got when searched on Internet says "JVM can not create any object before program runs. So, to run the program main should be invoked without creating any object. That's why main should be static."
But, I'm thinking that when JVM can load a class, why it can not create object before calling main method? after all JVM only creates and maintains all objects in our program.