void () { Object o = "Hello"; switch (o) { case String s: System.out.println(); throw new UnsupportedOperationException(); case Integer i: System.out.println(); break; default: throw new IllegalStateException("Unexpected value: " + o); } }