-
Notifications
You must be signed in to change notification settings - Fork 0
/
Day55.java
32 lines (26 loc) · 908 Bytes
/
Day55.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
// Introduction to Strings
// https://www.interviewbit.com/problems/introduction-to-strings/
import java.lang.*;
import java.util.*;
public class Day55 {
public static void main(String[] args) {
// YOUR CODE GOES HERE
// Please take input and print output to standard input/output (stdin/stdout)
// DO NOT USE ARGUMENTS FOR INPUTS
// E.g. 'Scanner' for input & 'System.out' for output
Scanner sc = new Scanner(System.in);
String a = sc.nextLine();
String b = sc.nextLine();
int l = a.length() + b.length();
System.out.println(l);
int res = a.compareTo(b);
if(res < 0) {
System.out.println("No");
}
else if(res >= 1) {
System.out.println("Yes");
}
String A = a.toUpperCase() + " " + b.toUpperCase();
System.out.println(A);
}
}