Why java main method is static?

Started by Favour, October 29, 2014, 08:22:28 PM

Previous topic - Next topic

Aleksander

Hello everyone, I would like to ask you a question that puzzles me, why java main method is static I thank you for giving me your answer quickly enough.

Maximillian

The main() method in C++, C# and Java are static because they can then be invoked by the runtime engine without having to instantiate an instance.