1/ Proposed for Java 17: JEP 406: Pattern Matching for switch (Preview). What can we do with these? Read on!
openjdk.java.net/jeps/406
May 23, 2021 · 12:31 PM UTC
2/ With pattern matching for switch, we can write code like this, where we test for a type on the left and use it directly on the right without having to cast it ourselves.


