public static void main(string args[]) Explanation

In Above application we are using public static void main. Each word has different meaning and different purpose.

Public : It is an Access Modifier, which(AM) defines who can access this method(In Java World). Public means that this method will be accessible to any class(If other class can access this class.).

Static : Keyword which identifies the class related this. It means that this class is not instance related but class related. It can be accessed without creating the instance of Class.

Void : Return Type, It defined what this method can return. Which is void in this case it means that this method will not return any thing.

main: Name of the method. This method name is searched by JVM as starting point for an application.

String args[] :  Parameter to main method.

About the author

J Singh

Main brain behind this blog/QnA site. She has written all these article as per her personal experience. She has published it mainly to help beginners. These articles might have some problems. So bear with her and let her know if you find any problem in any of the article.

6 Comments

Leave a Comment

Facebook
Twitter
Google+
Linkedin