Java 14 is released on March 17th, 2020. Let’s take a look at what is inside, and what makes new Java different from the older versions. Here is an overview of the major updates:
instanceof, Records, Text Blocks
Java 14 is going to be released on March 17, 2020. The new version of Java contains an interesting update to the Java language: new
switch expressions. Let’s see how the new
switch expressions can be used, what kind of advantages they offer, and what can potentially go wrong. In the end, we’ll tackle a tricky question about
The current design of the
switch statement in Java follows languages such as C and C++. It works only as a statement and supports fall-through semantics by default. Here’s an example of the classic
switch statement with an enum:
You might have noticed many case and break statements in the example above. …
Java 14 is going to be released on March 17, 2020. Besides ~2,400 bug fixes and small enhancements, the new version of Java contains 16 major enhancements, also called JEPs (Java Enhancement Proposals).
Let’s take a closer look at the major updates in Java 14: new switch expressions, better
NullPointerExceptions, improvements in garbage collection, JFR event streaming, and more.
This update to the Java language was already available in Java 12 and 13 but only as a preview language feature, which means it was not enabled by default. Finally, the new switch expressions are released in Java 14. …