English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
La méthode Java String subSequence() renvoie une séquence de caractères (une sous-séquence) à partir d'une chaîne de caractères.
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 {} {}