String.substring(int beginIndex)
public class Main {
public static void main(String[] args) {
String sports = "soccer,baseball,basketball";
System.out.println(sports.substring(7));
}
}
** Résultat d'exécution **
baseball,basketball
String.substring(int beginIndex, int endIndex)
public class Main {
public static void main(String[] args) {
String sports = "soccer,baseball,basketball";
System.out.println(sports.substring(7, 15));
}
}
** Résultat d'exécution **
baseball