0

in java every processing occurs inside main method. what happens if we exclude (String[] args) and make it as ()??can declare main() method like normal methods for other purposes. if so would overloading be taken place?

26th Sep 2016, 11:34 AM
riyas
5 Réponses
+ 2
string args[] is for comandline argument.. its must !!
26th Sep 2016, 7:22 PM
Bhushan Gaikwad
Bhushan Gaikwad - avatar
0
it's the overloading of main method u can do that ,but u hv to make a main method with arguments of String[] no matter what
26th Sep 2016, 12:23 PM
Ankur Sharma
Ankur Sharma - avatar
0
it's the blue print of the main method. You cannot avoid it. You can change the name args to something else but you cannot remove the whole thing. There has to be a String[] args
27th Sep 2016, 8:42 AM
ATONU GHOSH
0
thank u all
27th Sep 2016, 5:27 PM
riyas
0
if you exclude (String[] args) from main method then the public static void main() will be treated as normal method and no overloading is applicable for public static void main(String[] arsg) method.
1st Oct 2016, 6:45 PM
Vaibhav Kharche
Vaibhav Kharche - avatar