Java program's main method has to be declared static because keyword static allows main to be called without creating an object of the class in which the main method is defined. If we omit static keyword before main Java program will successfully compile but it won't execute. For a little detailed description, look at the usual signature of Java's main method. Above code line begins defining the main method. This is the line at which the program will start executing.
Can we change the order of public static void main() to static public void main() in Java?
Cave of Programming
Static Fields in Java
There can be times when it's useful to have values that are shared across all instances of a particular class. Static fields and static constants enable this type of sharing by belonging to the class and not to the actual objects. Normally fields and methods defined in a class can be used only when an object of that class type has been created.
The static keyword in Java is used for memory management mainly. We can apply java static keyword with variables, methods, blocks and nested class. The static keyword belongs to the class than an instance of the class. Suppose there are students in my college, now all instance data members will get memory each time when the object is created. All students have its unique rollno and name, so instance data member is good in such case.