class Main {
public static void main(String[] args) {
String s = "python";
// begin included, end excluded
System.out.println(s.substring(1, 4));
// one argument runs to the end
System.out.println(s.substring(2));
}
}a half-open [begin, end) window