Question: Given string strinput1 on one line and string strInput2 on a second line, assign outputStr with the shorter string. If the strings are the same

Given string strinput1 on one line and string strInput2 on a second line, assign outputStr with the shorter string. If the strings are the same length, assign outputStr with "Same length". Ex: If the input is: park orange then the output is: park 1 import java. util. Scanner; public class StringSize { OUSWN public static void main(String args) { Scanner sonr = new Scanner (System. in) ; String strInput1; String strInput2; String outputstr; 9 19 strInput1 = scor . nextLine(); 11 strInput2 = scor . nextLine(); 12 13 /* Your code goes here */ 14 15 System. out. printIn(outputStr); 16 17 }

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 Mathematics Questions!