Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle RMAN For Absolute Beginners

Authors: Darl Kuhn

1st Edition

1484207637, 9781484207635

More Books

Students also viewed these Databases questions