You are viewing a single comment's thread. Return to all comments →
import java.util.Scanner; public class Solution { public static void main(String[] args) { /* Read input */ Scanner scan = new Scanner(System.in); String s = scan.next(); int start = scan.nextInt(); int end = scan.nextInt(); scan.close(); System.out.println(s.substring(start, end)); } }
From my HackerRank Java solutions.
Seems like cookies are disabled on this browser, please enable them to open this website
Java Substring
You are viewing a single comment's thread. Return to all comments →
Java solution
From my HackerRank Java solutions.