Switch Expressions in JAVA 12

Java 12, JEP 325: Switch Expressions enhanced the traditional switch statement to support the following new features: • Multiple case labels • Switch expression returning value via break (replaced with yield in Java 13 switch expressions) • Switch expression returning value via label rules (arrow) P.S Switch expressions are a preview feature and are disabled […]