Question about main method | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Question about main method

how the main method in java can be overloaded.

14th Aug 2018, 9:49 AM
Vivek Mishra
Vivek Mishra - avatar
1 Answer
0
https://code.sololearn.com/cxlr5nQ6ECgz/?ref=app This way. However, each time you run a program, main with String[] argument will be executed, even if you specify more than 1 argument. You can call the overloaded main function only from another main function.
14th Aug 2018, 10:17 AM
Steppenwolf
Steppenwolf - avatar