While Java Development Kit (JDK) 11 won’t arrive for another month, work proceeds on its successor, JDK 12, with a switch expressions capability lined up for the release, expected in March 2019. Simplified coding is a goal of this capability.
Switch expressions, which will be in beta state in JDK 12, extends the
switch statement so it can be used as either a statement or an expression. This would enable both forms to use either “traditional” or “ simplified” scoping and control flow behavior. These changes would result in simplified “everyday” coding and prepare the way for use of pattern matching in
Source: New feed