Question: In this assignment, you will write a Java program using command line arguments. There is one method required: getMax, which takes two integer variables as

In this assignment, you will write a Java program using command line arguments.

There is one method required: getMax, which takes two integer variables as input, returns the bigger one of the two.

Your main method must look like the following (except the comment)

. main( String[] args)

{

int num1, num2;

num1 = Integer.parseInt(args[0]);

num2 = Integer.parseInt(args[1]);

System.out.println(the bigger value of the two is : + getMax(num1, num2));

} .

Supply at least 3 testing results.

You program may work like:

java Assign5 23 67

the bigger value of the two is 67

Show the results too...

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!