+ 2

Why in main method in java we use array of strings as parameters not any integer or other

I tried but it doesn't work

15th Jul 2019, 2:53 PM
Nishant Singh
Nishant Singh - avatar
7 Réponses
+ 2
Java only recognizes the main method if it has an array of strings of arguments.
15th Jul 2019, 2:56 PM
Airree
Airree - avatar
+ 1
Wait you pretty much asked the same question twice.
15th Jul 2019, 3:00 PM
Airree
Airree - avatar
+ 1
What kind of arguments would string[] args get?
17th Jul 2019, 9:22 AM
Seb TheS
Seb TheS - avatar
0
What is this airee u answered all my questions in the same way
15th Jul 2019, 2:57 PM
Nishant Singh
Nishant Singh - avatar
0
Swim u must int instead of string and make coding just for no. And show does it work and next thing is if u use void then why it matters to use string as argument I am not passing anything to main method
17th Jul 2019, 6:32 PM
Nishant Singh
Nishant Singh - avatar