Skip to content

Instantly share code, notes, and snippets.

@nherbaut
Created October 5, 2023 09:46
Show Gist options
  • Save nherbaut/23e89686ba8a267cfc0227dce63f6303 to your computer and use it in GitHub Desktop.
Save nherbaut/23e89686ba8a267cfc0227dce63f6303 to your computer and use it in GitHub Desktop.
L2.3.2 String.substring

Quelle est la taille de la string résultant de l'appel de String.substring? est-ce que le character correspondant à l'index passé en deuxième argument fait parti de la réponse

public class StringSubString{
public static void main(String... args){
String original = "sorbonnepantheonMIASHS";
String extracted = original.substring(4,7);
System.out.println(extracted);
}
}
@nherbaut
Copy link
Author

nherbaut commented Oct 5, 2023

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment