In java why main() function is static....
Because main method doesn't refer to any object..it is the entry point of the program.
There are two reasons for creating Java as a static
1. Constructor of a class in which main is defined gets call first if main is static
2. JVM uses static main to start execution of program
Bcoz for non static member for accessing u need to declare obeject
Because JVM do not have to create an object to call a main method !