The method signature of a Java main() method is:
public static void main(String[] args){
...
}
Is the
Let me explain these things in a much simpler way:
public static void main(String args[])
All Java applications, except applets, start their execution from main()
.
The keyword public
is an access modifier which allows the member to be called from outside the class.
static
is used because it allows main()
to be called without having to instantiate a particular instance of that class.
void
indicates that main()
does not return any value.