Great Deal! Get Instant $10 FREE in Account on First Order + 10% Cashback on Every Order Order Now

Copy the skeleton of code below into your answer. Then in the space indicated, add your own code to prompt the user for two Strings, report on the lengths of the two Strings, and then print the...

1 answer below »

Copy the skeleton of code below into your answer. Then in the space indicated, add your own code to prompt the user for two Strings, report on the lengths of the two Strings, and then print the shorter of the two strings as part of an output message as indicated below. If they are both the same length print the first one. Note that the final output should be on a line by itself.
Enter a String: CSE1223
Enter another: 1223
Your first has 7 characters.
Your second has 4 characters.
The shorter one is 1223
A second run of this program with different input might look like this:
Enter a String: CSE1223
Enter another: Java_CSE1223
Your first has 7 characters.
Your second has 12 characters.
The shorter one is CSE1223
Use the skeleton of the main method below to write your code.
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
TODO: Your code below this line
input.close();
}
Answered Same Day Dec 29, 2021

Solution

Shubham answered on Dec 29 2021
114 Votes
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here