What does this Java 17 program print?

from Java 17 features
Java 25 LTS beginner 2 min

What does this Java 17 program print?

Java
public class Main {
    static String normalize(Object value) {
        if (!(value instanceof String text)) {
            return "other";
        }
        return text.strip().toUpperCase();
    }

    public static void main(String[] args) {
        System.out.println(normalize(" Java "));
    }
}
Open in playground
Report an error