String[]args | Sololearn: Learn to code for FREE!
Новый курс! Каждый программист должен знать генеративный ИИ!
Попробуйте бесплатный урок
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 ответ
+ 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