Strings In Depth5 / 18
Up next

Strings are immutable

class Main {
    public static void main(String[] args) {
        String s = "hello";
        // s is never modified; a new string is returned
        String upper = s.toUpperCase();
        System.out.println(s + " " + upper);
    }
}
What you're solving

methods return new strings