Usually, we use
public static void main(String [] args);
but the official java docs says we can use
public static void main(String ... args);
which is working fine. Then what is the difference between them.
and if they are same then why we cannot define an array using ... instead of using [].
Asked
Active
Viewed 25 times
0
-
2In practical terms, there is not difference between those two ways of declaring `main`. – Stephen C Mar 19 '22 at 13:44