What is the use of String[] args? Why does main method takes it? | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
+ 1

What is the use of String[] args? Why does main method takes it?

23rd Nov 2020, 3:22 PM
Shubhdeep Singh
Shubhdeep Singh - avatar
2 Respostas
+ 1
To accept input through command line arguments.. Edit : Shubhdeep Singh https://www.tutorialspoint.com/Java-command-line-arguments.
23rd Nov 2020, 3:26 PM
Jayakrishna šŸ‡®šŸ‡³
+ 1
It is the list of command line parameters given. They can be used to control the behavior, give a folder or file to use in your program etc.
23rd Nov 2020, 3:30 PM
Benjamin JĆ¼rgens
Benjamin JĆ¼rgens - avatar