Frage im Vorstellungsgespräch bei IBM

Why is the main method in a java class static ?

Antwort im Vorstellungsgespräch

Anonym

8. Sep. 2015

Because it needs to be called without instantiating the class it is a member of. main() method is called to start the program, no classes have been instantiated into objects yet at that moment, so the main() method needs to be static.

4