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:CSE1223Enter another:1223Your 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:CSE1223Enter another:Java_CSE1223Your 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 lineinput.close();}
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here