File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed
src/com/codefortomorrow/beginner/chapter3 Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change 7
7
* c) "wE LoVe tO CoDe" -> "e love to code"
8
8
*/
9
9
10
- public class StringSlicer {
10
+ public class StringSlicer {
11
11
public static void main (String [] args ){
12
12
//Write Code here
13
13
}
Original file line number Diff line number Diff line change 6
6
* b) "A Handmaid's Tale" -> "s"
7
7
* c) "wE LoVe tO CoDe" -> "e love to code"
8
8
*/
9
- public class StringSlicer {
10
- public static void main (String [] args ){
9
+ public class StringSlicer {
10
+ //Solution Code Below
11
+ public static void main (String [] args ) {
11
12
//Initialize original strings
12
13
String s1 = "A Tale of Two Cities" ;
13
14
String s2 = "A Handmaid's Tale" ;
14
15
String s3 = "wE LoVe tO CoDe" ;
15
16
16
17
//Use substring + uppercase on the first one
17
- System .out .println (s1 .toUpperCase ().substring (11 ,17 ));
18
+ System .out .println (s1 .toUpperCase ().substring (11 , 17 ));
18
19
19
20
//Use charAt for s2
20
21
System .out .println (s2 .charAt (11 ));
You can’t perform that action at this time.
0 commit comments