English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
The Java String subSequence() method returns a character sequence (a subsequence) from the string.
The syntax of the subSequence() method is:
string.subSequence(int startIndex, int endIndex)
The subSequence() method has two parameters.
startIndex - Start Index
endIndex - End Index
The subSequence() method returns a CharSequence (Character Sequence)。
class Main { public static void main(String[] args) { System.out.println(str.subSequence(3, 8)); // a Pro } }