Java switch expressions were added to Java in Java 12. Java switch expressions enable a switch instruction to return a value, or to be evaluated to a value, in other words. This Java switch expression tutorial explains how the new switch expressions work.
Here is a link to a textual version of this tutorial:
http://tutorials.jenkov.com/java/swit...
Here is a link to the first video in this Java switch tutorial series:
• Java Switch #1 - Java Switch Statement Basics