What is String [] args?
I'll answer
Earn 20 gold coins for an accepted answer.20
Earn 20 gold coins for an accepted answer.
40more
40more
Studied at Yale University, Lives in New Haven. Currently working as a journalist for a major news outlet.
In Java 'args' contains the supplied command-line arguments as an array of String objects. In other words, if you run your program as 'java MyProgram abc xyz' then 'args' will contain ["abc", "xyz"]. When a java class is executed from the console, the main method is what is called.
2023-05-09 14:09:45
评论(499)
Helpful(122)
Helpful
Helpful(2)

Felix Brown
QuesHub.com delivers expert answers and knowledge to you.
In Java 'args' contains the supplied command-line arguments as an array of String objects. In other words, if you run your program as 'java MyProgram abc xyz' then 'args' will contain ["abc", "xyz"]. When a java class is executed from the console, the main method is what is called.