Webastor - Programming Tips and Tricks

Programming language => Java => Topic started by: Aleksander on October 29, 2014, 08:22:28 PM

Title: Why java main method is static?
Post by: Aleksander on October 29, 2014, 08:22:28 PM
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.
Title: Re: Java main
Post by: Maximillian on June 07, 2018, 10:11:13 PM
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.