0

String[]args

Why does the program throw an error if we don’t include the above title in the main as parameter ?

21st Feb 2019, 4:53 PM
Prathmesh Agashe
Prathmesh Agashe - avatar
1 Odpowiedź
+ 7
It is the distinct signature for the main method, Java needs to know the entry for the program and that signature tells Java that it was the one main method that should be executed, without that signature Java gets a little "confused" of where to begin : )
21st Feb 2019, 5:39 PM
Ipang