Fundamentals9 / 25
Up next

String basics

class Main {
    public static void main(String[] args) {
        String greeting = "hi" + " " + "there";
        System.out.println(greeting);
        // repeat() copies a string n times
        System.out.println("ab".repeat(3));
        System.out.println(greeting.length());
    }
}
What you're solving

concatenation, repeat, length