Java

Java 13 new features: Switch expressions overview



Switch statements have been a core tool Java programming, in recent Java releases like JDK 11, 12 and 13 there have been some improvements such as Switch Expressions and the use of arrow syntax in Switch statements.

We make use of the Yield keyword in switch expressions, this was introduced in Java 13.

Switch expressions enable you to return values from a switch statement.

AdoptOpenJDK:

Leave a Reply

Your email address will not be published. Required fields are marked *