when we are running java file it goes to JVM. JVM knows the name of class but creating object of that class and then call main method is overhead for JVM that reason we make that main method static. advantage of doing that is we can able to call static main method by class name without creating object.that reason we are making main method as static. | 0 |
By: [email protected] On: Thu Aug 03 12:33:22 IST 2017 0 0 0 | 0 |
Are You Satisfied :0Yes0No |
so JVM needs not to make object of main class | 0 |
By: [email protected] On: Wed Aug 09 11:35:30 IST 2017 0 0 0 | 0 |
Are You Satisfied :0Yes0No |
Main method needs to be accessed from outside the class without creating any objectof the class.That's why main method should be static. | 0 |
By: [email protected] On: Mon Sep 11 10:49:06 IST 2017 0 0 0 | 0 |
Are You Satisfied :0Yes0No |