Pattern Matching for switch is preview feature in Java 17. ... foo(Object o) { switch (o) { case Integer i -> System.out.println("String:"); ...
確定! 回上一頁