Michael Inden

Best of Java 15 and beyond—my favorite features

Stop writing boilerplate. Java Records let you create immutable data classes in a single line, eliminating common bugs and modernizing your code.

Best of Java 15 and beyond—my favorite features
#1about 6 minutes

Modernizing switch statements with new syntax

New switch expressions use arrow syntax and can return values, eliminating error-prone fall-through logic and making code more concise.

#2about 3 minutes

Getting more informative NullPointerException messages

Enabling a specific JVM option provides detailed messages for NullPointerExceptions, identifying exactly which variable was null in a complex expression.

#3about 3 minutes

Simplifying multi-line strings with text blocks

Text blocks allow for creating multi-line strings using triple quotes, which preserves formatting and eliminates the need for concatenation and escape characters.

#4about 10 minutes

Reducing boilerplate with immutable data records

Records provide a concise syntax for creating immutable data carrier classes, automatically generating constructors, accessors, equals, hashCode, and toString methods.

#5about 3 minutes

Improving type checks with pattern matching for instanceof

Pattern matching for instanceof simplifies type checks by binding the casted object to a new variable, eliminating the need for an explicit cast.

#6about 6 minutes

Using JShell for scripting and API experimentation

JShell serves as a modern REPL for Java, enabling quick experiments, API exploration, and dynamic code evaluation, especially with its improved multi-line editing.

#7about 6 minutes

Examining the future of Java and its competition

Java's evolution is crucial for maintaining its popularity against languages like Python, with Java 16 introducing features like a packaging tool and sealed classes.

#8about 3 minutes

Overview of major Java development projects

Key long-term initiatives like Project Amber (language features), Valhalla (value types), and Loom (lightweight concurrency with fibers) are shaping the future of the Java platform.

#9about 3 minutes

Concluding thoughts on Java's modernization progress

While Java is becoming more modern and attractive with new syntax and APIs, challenges remain, such as the timing of the next LTS release and the lack of native JSON support.

Related jobs
Jobs that call for the skills explored in this talk.

d

Saby Company
Delebio, Italy

Junior

asasd

Expire

Remote
Junior

Featured Partners

Related Articles

View all articles
BB
Benedikt Bischof
Using Java 17 latest features in real world projects
Welcome to this issue of the WeAreDevelopers Live Talk series. This article recaps an interesting talk by Ron Veen who introduced the audience to some of the most interesting features that got added to the Java language.About the speaker:Ron is a hig...
Using Java 17 latest features in real world projects
MI
Michael Inden
Modern Java Text Blocks
In this blog, I will present the long-awaited syntax extension named Text Blocks. They simplify the definition of multi-line strings. These can now be written without tedious concatenations. Even better, you can also do without error-prone escaping, ...
Modern Java Text Blocks
MI
Michael Inden
Modern Java Switch Expressions
In this blog, I will cover some improvements of switch. The old syntax dates back to the early day of Java, and its handling is a bit cumbersome. Let's look at the newer, slightly modified syntax for switch, called Switch Expressions. With it, case d...
Modern Java Switch Expressions
MI
Michael Inden
Modern Java Records
In this blog, I will present Records, one of my favorite features of modern Java. Records represent a simplified form of classes whose methods are implicitly derived from the attributes defined as constructor parameters. A record constitutes a collec...
Modern Java Records

From learning to earning

Jobs that call for the skills explored in this talk.