You are viewing a single comment's thread. Return to all comments →
Scanner sc=new Scanner(System.in); String A=sc.next(); String B=sc.next(); sc.close(); /* Enter your code here. Print output to STDOUT. */ int sumOfLength = A.length()+B.length(); System.out.println(sumOfLength);
if(A.compareTo(B)>0){ System.out.println("Yes"); } else{ System.out.println("No"); } String s = A.substring(0,1).toUpperCase() + A.substring(1); String y= B.substring(0,1).toUpperCase() + B.substring(1); System.out.print(s+" "+y);
Java Strings Introduction
You are viewing a single comment's thread. Return to all comments →
Scanner sc=new Scanner(System.in); String A=sc.next(); String B=sc.next(); sc.close(); /* Enter your code here. Print output to STDOUT. */ int sumOfLength = A.length()+B.length(); System.out.println(sumOfLength);