While Java Development Kit (JDK) 11 won’t arrive for another month, work proceeds on its successor, JDK 12, with two experimental (beta) capabilities proposed so far for the release, expected in March 2019: switch expressions and raw string literals.

JDK 12 is now in development in the OpenJDK community.

[ 15 Java frameworks that give developers a boost. • Which tools support Java’s new modularity features. | Keep up with hot topics in programming with InfoWorld’s App Dev Report newsletter. ]

Switch expressions

Switch expressions capability would simplify coding by extending 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 switch.

To read this article in full, please click here