Pergunta de entrevista da empresa IBM

Why is the main method in a java class static ?

Resposta da entrevista

Sigiloso

8 de set. de 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