+ 1

String[ ] args in java???

I know that String[ ] args is for command line argument but what does this mean and what is it's use?

24th Jun 2018, 5:21 AM
harshit
harshit - avatar
2 Respostas
+ 2
String[] args is an array of Strings called "args", it is usually a parameter in the main() method though the parameter name doesn't have to be "args"("args" is just the convention)
24th Jun 2018, 8:21 PM
David Akhihiero
David Akhihiero - avatar
+ 1
you answered your own question. if a java program's developer wants certain aspects to be modifiable when running through command line, you can take elements from "args"
24th Jun 2018, 12:09 PM
hinanawi
hinanawi - avatar