- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsolution.java
More file actions
Latest commit
17 lines (15 loc) · 479 Bytes
/
Copy pathsolution.java
File metadata and controls
17 lines (15 loc) · 479 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// https://github.com/Utkarsh299-tech
importjava.io.*;
importjava.util.*;
importjava.text.*;
importjava.math.*;
importjava.util.regex.*;
publicclassSolution {
publicstaticvoidmain(String[] args) {
Scannerin = newScanner(System.in);
StringS = in.next();
intstart = in.nextInt();
intend = in.nextInt();
System.out.println(S.substring(start, end)); // This will print the substring from index start to end - 1
}
}