Java 12 / JDK 12: General Availability
(mail.openjdk.java.net)
haocheng
積分 0
Switch expression 很不錯耶,不過這一版還是 Preview 而已
IngramChen
積分 0
怎麼 preview 法?難不成之後再改一次語法嗎?
JEP 12: Preview Language and VM Features1
看來是會變動,要開 --enable-preview
才能用的語法。
個人也對 preview 這件事還沒搞懂 然後原本的 string multiline literal 也從 preview 先拔掉了XD
Switch expressions is a preview language feature. This essentially means that even though it is complete, it has a possibility of not being confirmed as a permanent feature in a future Java release. This happens for a reason. Java 12 and IntelliJ IDEA1