June 21, 2013 | Mudassir Shahzad

Why main method is static in Java

This is one of the basic question asked in interviews or in gatherings of professionals.

So here we go,

Main method is static in java because

 

This is just a convention. In fact, even the name main(), and the arguments passed in are purely convention. (more…)

Share: Facebook Twitter Linkedin