Home » Interview » Technology

What is String Args in Java?

Correct Answer: String Args (String []) is an array of parameters of type String 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 Hello World' then 'args' will contain ["Hello", "World"] When a java class is executed from the console, the main method is what is called

← Previous Question Next Question→

Discussion & Comments

No comments yet. Be the first to comment!
Join Discussion