+ 2

[DUPLICATE] What does (string[ ] args ) do in java ? Also what does string [ ] seperately do in java and "agrs" do in java

30th Jan 2018, 6:56 PM
Sahib Kohli
Sahib Kohli - avatar
3 Answers
+ 21
https://www.sololearn.com/Discuss/125799/?ref=app /* do practically , using command prompt,notepad etc , u'll understand*/
30th Jan 2018, 7:06 PM
Gaurav Agrawal
Gaurav Agrawal - avatar
+ 7
string[] args is used in java to take command line arguments of user gives at command prompt before executing the program. string [] is just array of string used to hold some strings and args is just a variable name we can use any valid java identifier instead of it.
30th Jan 2018, 8:26 PM
ą¤•ą¤¾ą¤®ą„‡ą¤¶
ą¤•ą¤¾ą¤®ą„‡ą¤¶ - avatar
+ 5
It shows that the main method accepts an array of strings as it's parameter.It does have to be string[] args it could string[] anything.args is the arrays name
30th Jan 2018, 7:02 PM
į Œį ŒCode X
į Œį ŒCode X - avatar