Can there exist two main methods in a Java program?
Only by the difference in their arguments like:
public static void main(String[] args)
Case :1 > We have two main method but with "Main" AND "main2" so jvm only a=calling "main" method .
2> Same method but diff params, still jvm calling "main(String[] args) " meyhod.
3> Exactly same method but it gives copile time error as you can not have two same name method in a single class !!!
Hope it will give you clear pic