Question d’entretien chez IBM

Why is the main method in a java class static ?

Réponse à la question d'entretien

Utilisateur anonyme

8 sept. 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