In Simple : Jvm needs a default method to start program and from that method it starts instantiating the objects of other classes. so if every one uses their own methods then jvm is not able to find from where it need to start compiling. so Java people kept a default method not main() method, it is argumented main ie "main(String var)" and this shoubld be always public and static. so that it is visible to the jvm.
I think ur question is Y, a java program cotains a method main() that takes String args as parameter i,e main(String args).
When we compile a java program, then java compiler comes into picture and it compiles the java program from top to bottom with out checking main method. i,e for just compiling a java program, main method is not required. But if we want to run a java program JVM comes into picture. Here JVM searches for a "public static void main(String args)" method for executing the program. JVM blindly executes the program from the "public static void main(String args)" method. So without "public static void main(String args)" JVM doesnot executes the java program. After calling main method only all other tasks will be done.. such as object creations... etc.. So "public static void main(String args) " method is must in a java program for running.
Why public --> Because the program should available to JVM (JVM is also a program)
Why static --> Because without creating an object JVM should execute main method
Why void --> Because main methos doesnot return any value.
Every program starts with the main function because that is how the run-time library startup routines work. It is the established convention. There has to be some entry point, otherwise the program could not do anything, and main() is the defined entry point.
That is, main() is the entry point after run-time library startup.
Not the program starts with main, only its execution. In the source the main can be at the very end of the file.