Skip to content

Commit 246422f

Browse files
committed
Experiment 8_1
1 parent 2421f75 commit 246422f

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import java.util.*;
2+
3+
class Exp8_1 {
4+
public static void main(String[] args) {
5+
String str = "UPES DEVOPS";
6+
int findex = str.indexOf("S");
7+
int lindex = str.lastIndexOf("S");
8+
System.out.println("First Index = " + findex);
9+
System.out.println("First Index = " + lindex);
10+
11+
}
12+
}

0 commit comments

Comments
 (0)