Java tutorial
public class Main { public static void main(String[] args) { String str = "java2s.com"; System.out.println("string = " + str); // returns the specified subsequence from index 2 to 9 System.out.println("string subsequence = " + str.subSequence(2, 9)); } }