Question: Strings Exercise 2 Problem Write a program that captures input from the user, prints the inputted string as many times as its length, and prints

Strings Exercise 2
Problem
Write a program that captures input from the user, prints the inputted string as many times as its length, and prints as many lines of this as the length of the input string.
Here is what you have so far:
public class Exercise2{
public static void main(String args[]){
String myString = args[0];
//add code below this line
MUS //add code above this line
}
}
Click to compile your code
COMPILE CODE
Test your code with a few different values
TEST WITH CAT
Expected Output
TEST WITH TREE
Expected Output
TEST WITH !@#^&
Expected Output
Requirements
You should not make any changes to the code that already exists. If you accidentally delete any existing code, you can copy and paste the entire program from above.
You can use any number of string methods and/or conditionals to produce the desired output.
Strings: Exercise 2
When your code is ready, click the button below to submit your work for grading.
Check It!(1 left)
ANSWER MUST BE IN JAVA!!!
 Strings Exercise 2 Problem Write a program that captures input from

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!