0
Static
why is it said that main method should always be static?
2 Antworten
+ 2
Because you want to get access to your main method without creating an instance of your class :)
+ 2
static access modifier binds the method (main) to the class, where it was declared, as such, there be no need for the virtual machine to have an object created based on that class before it can invoke the static method, and start the program.
Hth, cmiiw