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.

Featured Partners

From learning to earning

Jobs that call for the skills explored in this talk.

Java Developer


Charing Cross, United Kingdom

104K
iOS
Java
REST
Redshift
+5