What is the relevance of using static keyword in main class of java program

Showing Answers 1 - 1 of 1 Answers

DJ

  • Apr 12th, 2007
 

Static before main method is used because main method is called by the JVM, with out making any object of that class, since to call any method of the class we meed some obj of the class, but here before making any object  jvm need to call main method, hence it is made static so that it can be instanciated with out making any object.
Hope this is clear. In case confusion , let me know will explain it in more detail.

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions