+ 2
[DUPLICATE] Why do we write (String [] args) in java program?
I use bluej on my desktop and i do not need to write this there. I am wondering from a long time that why do we write this code and what is its use?
3 Answers
+ 7
âșâșâșâșâșâșâșhttps://stackoverflow.com/questions/890966/what-is-string-args-parameter-in-main-method-javađđđđđđđ
+ 3
This code is simply an "argument" sent to the main method, telling it that the following codes after{ should be identified as an array of strings called "args", however you could call it anything. I haven't written any code without having to including the "arguments" so I can't say if a would work with them but it wouldn't return an error even if left blank though.
It is simply a "signature" for the main method.



