forked from sPredictorX1708/Ultimate-Java-Resources
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJavaStringsIntroduction.java
More file actions
21 lines (20 loc) · 640 Bytes
/
JavaStringsIntroduction.java
File metadata and controls
21 lines (20 loc) · 640 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import java.util.*;
public class test{
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");
}
String a1 = Character.toString(a.charAt(0));
String b1 = Character.toString(b.charAt(0));
String s1 = a1.toUpperCase()+a.substring(1);
String s2 = b1.toUpperCase()+b.substring(1);
System.out.println(s1+" "+s2);
}
}