Java 12 is introducing Switch Expressions to improve your everyday coding experience.
Find out why and how to use it with the upcoming IntelliJ IDEA 2019.1 https://blog.jetbrains.com/idea/2019/02/java-12-and-intellij-idea/ …
#Java12pic.twitter.com/2IFTnFxGXP
If you add a constant, say, XL, to enum Size, you'll need to modify the code that uses switch expressions. Either add the missing switch branch (for XL), or add a default label.
-
-
The point is that the two code examples there have different behaviour. The "before" version will have a default value of -1, the "after" will not. This information is lost.
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
)
(will fill a bug report)