When is java main method called?

Ads
 

When is java main method called?

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.

Ads









Related Tutorials/Questions & Answers:
When is java main method called?
java sleep in main method
Advertisements
java sleep in main method
Is main method compulsory in Java?
main method
main method
Should a main method be compulsorily declared in all java classes?
main() method
Accessing non-static members through the main method in Java.
What is the arguement of main method?
Can a main method be overloaded?
Why we should use string args[] in main method in java?
Why is the main method declared static?
What is the return type of the main method?
What if the main() method is declared as private?
Can a main method be declared final?
JAVA what is different between static block and public static void main(String a[]) method
When will you define a method as static?
What is the first argument of the String array in main() method?
What is Public static void main
how to open one Jframe from main method call
Till Slip Program Error Free - No Main Method
Till Slip Program Error Free - No Main Method
Till Slip Program Error Free - No Main Method
Till Slip Program Error Free - No Main Method
Till Slip Program Error Free - No Main Method
Till Slip Program Error Free - No Main Method
Finalize Method in Java
java method
pack() vs. setSize() Method in Java
java main program

Ads