Latest Tutorials| Questions and Answers|Ask Questions?|Site Map

Home Answers Viewqa Java-Beginners When is java main method called?

View Questions and Answers by Category


Have Programming Question? Ask it here!

Java Coder
When is java main method called?
1 Answer(s)      2 years and 11 months ago
Posted in : Java Beginners

When is java main method called? Please explain the main method in Java with the help of code.

View Answers

May 10, 2012 at 11:43 AM

In a java class, main(..) method is the first method called by java environment when a program is executed. When you execute a class with the Java interpreter, the runtime system starts by calling the class's main() method. The main() method then calls all the other methods required to run your application.

Related Tutorials/Questions & Answers: