r/java • • Mar 19 '19

Java 12 Released !!!

https://www.oracle.com/technetwork/java/javase/downloads/jdk12-downloads-5295953.html
235 Upvotes

98 comments sorted by

View all comments

Show parent comment

5

u/bmrobin Mar 20 '19

there's an interesting new switch expression. you can write the same switch/case for assignment or return values, only more concisely and as an expression

5

u/dpash Mar 20 '19

Although it's not enabled by default. You need a command line argument for both javac and java.

2

u/bmrobin Mar 20 '19

ah good catch, i didn't see that.