Strings In Depth9 / 18
Up next

substring

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));
    }
}
What you're solving

a half-open [begin, end) window