Science, asked by shubhamchandak5087, 1 year ago

How to use string args in java?

Answers

Answered by varuncharaya20
0
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 one two then args will contain ["one", "two
Answered by Anshu33845
0

Answer:

String args [ ] is the parameter to the main method where the argument name could be anything whatever you want.

Explanation:

In the parentheses of second line, we use string args =>

public class FirstProgram

{

public static void main (String [ ] args)

{

System.out.println("Hi");

}

}

Similar questions