Java 13 – Switch Expressions

In Java 13, the JEP 354: Switch Expressions extends the previous Java 12 Switch Expressions by adding a new yield keyword to return a value from the switch expression. P.S Switch expressions are a preview feature and are disabled by default. Note This is a standard feature in Java 14. 1. No more value breaks! …

Read more

What is new in Java 13

Java 13 reached General Availability on 17 September 2019, download Java 13 here or this openJDK archived. Java 13 features. 1. JEP 350 Dynamic CDS Archives 2. JEP 351 ZGC: Uncommit Unused Memory 3. JEP-353 Reimplement the Legacy Socket API 4. JEP-354 Switch Expressions (Preview) 5. JEP-355 Text Blocks (Preview) Java 13 developer features. Switch …

Read more

Java 12 – Switch Expressions

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 by default. A …

Read more