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
Happy
Happy
0 %
Sad
Sad
0 %
Excited
Excited
0 %
Sleepy
Sleepy
0 %
Angry
Angry
0 %
Surprise
Surprise
0 %

About Author

Average Rating

5 Star
0%
4 Star
0%
3 Star
0%
2 Star
0%
1 Star
0%

Leave a Reply

Your email address will not be published. Required fields are marked *