Question: This a JAVA Programming assignment. 1. Create a class that has a main method and a static method whose prototype is static void doSomething(); //

This a JAVA Programming assignment.

1. Create a class that has a main method and a static method whose prototype is

static void doSomething(); // displays a fixed message on the console

2. Create the doSomething method. The doSomething method outputs the message doSomething entered to the console.

3. From main call the doSomething method.

4. Run and verify that doSomething is called from main.

5. Modify the doSomething method to accept a String as input and modify the code to output the input String to the console.

6. Modify main to call doSomething and pass a String value.

7. Run and verify the correct value is output to the console

8. Modify the doSomething method to accept two inputs. A String and an int. Also, modify the code to output the String as many times as indicated by the value of the int. You should make sure the input int is greater than 0 but less than 10.

9. Modify main to call doSomething with a String and int value.

10. Run and verify the correct values are output to the console.

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!