0
0
Read Time:33 Second
“A string is traditionally a sequence of characters, either as a literal constant or as some kind of variable.” — Wikipedia: String (computer science)
import java.io.*;
import java.util.*;
public class Solution {
public static void main(String[] args) {
Scanner sc=new Scanner(System.in);
String A=sc.next();
String B=sc.next();
System.out.println(A.length()+B.length());
if(A.compareTo(B)>0)
System.out.println("Yes");
else
System.out.println("No");
System.out.println(A.substring(0,1).toUpperCase()+A.substring(1,A.length()).toLowerCase()+" "+B.substring(0,1).toUpperCase()+B.substring(1,B.length()).toLowerCase());
}
}
Compiler Message
Success
Input (stdin)
- hello
- java
Expected Output
- 9
- No
- Hello Java