public static void main - Explain?

public static void main - Explain?

Public is an access modifiers tells that this method can be accessed anywhere inside or outside the package by any class\' object reference. 

Static means there is only one copy of that method is available to all the instances of the class. void is simply a return type of the method telling that this method will return nothing.main is an identifier to identify the method. The main() method is the entry point to the program.

Date:2014-01-09 00:00:00

Post Your Answers

User Email:

User Name:

Related Java Subjective Links

Java Subjective interview questions and answers for experienced and fresher