There is a more complex version of substring() that takes both start and end index numbers: substring(int start, int end) returns a string of the chars beginning at ...
codingbat.com