Skip to content

Commit 96df065

Browse files
Added string methods
1 parent a7005f5 commit 96df065

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

java_basics/java_string/src/Strings.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public static void main(String[] args) {
1818

1919
System.out.println("IndexOF method = " + s.indexOf('l'));
2020

21-
System.out.println("LastINs=dexOf MEthod" + s.lastIndexOf('e'));
21+
System.out.println("LastIndexOf Method" + s.lastIndexOf('e'));
2222

2323
System.out.println("Compareto method = " + s.compareTo("Computer"));
2424

@@ -33,6 +33,8 @@ public static void main(String[] args) {
3333
System.out.println("End With =" + s.endsWith("ve"));
3434

3535
System.out.println("Trim Method = " + s.trim());
36+
37+
System.out.println("Contains Method = " + s.contains("ty"));
3638

3739
}
3840

0 commit comments

Comments
 (0)