void () { String o = "Hello"; switch (o) { case String s when s.length() == 1: System.out.println(); case "1": System.out.println(); break; default: throw new IllegalStateException("Unexpected value: " + o); } }