Question: Using the IST Linux system create the following Java command line iterator application Lab3. Pass in four arguments from the Linux command line when the

Using the IST Linux system create the following Java command line iterator application Lab3. Pass in four arguments from the Linux command line when the program starts.

For example java Lab3 value1 value2 value3 value4

The four command line arguments get passed into the main method as a String array in the variable object named args. Remember they get passed in as strings so you need to parse them into integers using the Integer.parseInt(args[X]) if you want to use them as integers. Create four sections that perform the following functions.

if expression: check if matches the value1 passed in and you select a hardcoded value to check, the code block will print the value matched

if-else expression: check if matches the value2 passed in select a hardcoded value, code block will print the value matched or not matched

if expression with a boolean condition: check if matches the Boolean value3 passed in, code block will print the boolean value

switch statement: Using the value4 passed in find the value in the switch and print the value one, two, three. Check only for 1-3 values.

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!