Here you can find the source of substring(String string, int start, int length)
public static String substring(String string, int start, int length)
//package com.java2s; //License from project: Open Source License public class Main { public static String substring(String string, int start, int length) { if (length < 0) throw new IndexOutOfBoundsException("Parameter length cannot be negative."); return string.substring(start, start + length); }//ww w . j a va 2s. c o m }