Skip to content

Commit 4b4c06c

Browse files
authored
Create Stringfr.java
1 parent e9a8c1c commit 4b4c06c

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

Stringfr.java

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
import java.io.*;
2+
import java.util.*;
3+
4+
public class Stringfr {
5+
6+
public static void main(String[] args) {
7+
8+
Scanner sc=new Scanner(System.in);
9+
String A=sc.next();
10+
String B=sc.next();
11+
int Al=A.length();
12+
int Bl=B.length();
13+
System.out.println(Al+Bl);
14+
if(A.compareTo(B)>0){
15+
System.out.println("Yes");
16+
}
17+
else{
18+
System.out.println("No");
19+
}
20+
String ogA=A.substring(0,1).toUpperCase()+A.substring(1);
21+
String ogB=B.substring(0,1).toUpperCase()+B.substring(1);
22+
System.out.println(ogA+" "+ogB);
23+
}
24+
}

0 commit comments

Comments
 (0)