We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5744b77 commit 71575c2Copy full SHA for 71575c2
JavaSubstring.java
@@ -0,0 +1,17 @@
1
+import java.util.Scanner;
2
+public class JavaSubstring
3
+{
4
+ public static void main(String[] args)
5
+ {
6
+ Scanner sc = new Scanner(System.in);
7
+ System.out.println("Enter the String: ");
8
+ String S = sc.nextLine();
9
+ System.out.println("Enter the Starting Point: ");
10
+ int start = sc.nextInt();
11
+ System.out.println("Enter the Ending Point: ");
12
+ int end = sc.nextInt();
13
+ System.out.println("The Substring is: ");
14
+ System.out.println(S.substring(start, end));
15
+ }
16
+
17
+}
0 commit comments