+ 2
[DUPLICATE] Why we write String args()
4 Answers
+ 13
"String[] args" is used to collect commandline arguments/data for your program. Ex: You can run your program with links to files you want it to use.
If you want to see other answers, you can search for similar questions, like this one: https://www.sololearn.com/Discuss/1524/?ref=app
By the way, welcome to the SoloLearn Q&A, Trayambak! ^_^ Have fun learning, and happy coding!
Here are our general posting guidelines:
https://www.sololearn.com/discuss/321242/?ref=app
https://www.sololearn.com/Discuss/593497/?ref=app
https://www.sololearn.com/Discuss/333866/?ref=app
+ 4
String[] args is a String array containing the argument for the JVM. It's just a variable name, you could it also name String[] cmd or String[] xyz instead.
+ 1
it creates an Array of strings maybe used by the compiler for some task i'll come to know about soon
welcome to sololearn community
Trayambak!!!!!
keep asking and clearing doubts!