The public static void main function is important function in Java programming language. In this section we will learn about main function.
The main method is the first method, which the Java
Virtual Machine executes. When you execute a class with the Java interpreter,
the runtime system starts by calling the class's
method then calls all the other methods required to run your application. It can
be said that the main method is the entry point in the Java program and java
program can't run without this method.
The signature of main() method looks
public static void main(String
The method signature for the
method contains three modifiers:
publicindicates that the
main()method can be called by any object.
staticindicates that the
main()method is a class method.
voidindicates that the
main()method has no return value.
Posted on: June 11, 2009 If you enjoyed this post then why not add us on Google+? Add us to your Circles