+ 1
Can we overload Main method in Java? And what if if did overload it i.e. from which method the main thread will start from?
3 Answers
+ 2
The main method used by the JVM as the entry point must respect the signature "public static void main" which by the way works the same "static public void main" and it must respect the parameters "Array of String (String [] args)", if you change only the parameters (overloading) then the JVM will see your version of "main" as a common method instead of the entry point for the java application. It's not recommended at all to overload or overwrite the main method.
+ 2
yep
- 1
yes