What is the argument of main method in Java?

Benjamin Martin | 2023-05-05 12:30:26 | page views:1744
I'll answer
Earn 20 gold coins for an accepted answer.20 Earn 20 gold coins for an accepted answer.
40more

Madison Brown

Studied at Harvard University, Lives in Boston.
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-10 12:30:26

Lucas Baker

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.
ask:3,asku:1,askr:137,askz:21,askd:152,RedisW:0askR:3,askD:0 mz:hit,askU:0,askT:0askA:4