Skip to content

Latest Articles

Java Functional Interfaces (with Examples)

September 28, 2026Java functional interfaces explained from the ground up: the rule, @FunctionalInterface, all 43 interfaces in java.util.function, and when to write your own.

Java Optional (with Examples)

September 25, 2026Java Optional explained with examples: of() and ofNullable(), orElse() vs. orElseGet(), map() and flatMap(), when to use Optional, and what Valhalla changes.

Java Lambda Expressions (with Examples)

September 23, 2026Java lambda expressions explained from the ground up: syntax, target types, effectively final, method references, and how the JVM runs them.

Java Basics + Data Structures

This category covers core Java functionality, such as String processing, object conversion, and random number generation, as well as data structures, such as collections, maps and sets, trees, queues, deques, and stacks.

Java substring() Method

How to use Java’s String.substring() method? How does substring() work internally, and how has the implementation changed over time?

Project Amber – Java Syntax Enhancements

In Project Amber, new Java language features are being developed such as switch expressions, text blocks, records, pattern matching, and sealed classes.

Java Text Blocks

Text blocks are a notation for multiline strings in Java. Why do we need them? How to write and format them? Which escape sequences must we use?

Unnamed Variables and Patterns in Java

With the underscore (_), you can mark variables and patterns in Java that you don’t need – making your code more concise. Learn what to watch out for.

String Templates in Java

String templates were withdrawn after two previews (Java 21/22): how they worked, why the design was pulled, and what the alternatives are.
Java versions cheat sheet – stacked PDF pages

Free PDF:

Your Java Versions Cheat Sheet

All features from Java 10 to Java 27 – one page per version

Get the compact overview of all Java versions. You’ll instantly know which updates are worth adopting in your project – and see at a glance which Java version introduced a specific feature.

You get access to this PDF collection by signing up for my newsletter. You can opt-out at any time.

Advanced Java Topics

This section covers advanced Java topics such as reflection, concurrency, garbage collection, and the Java memory model.

New Java Features

Every new Java release brings big and small changes:

  • Changes to the language itself (lambdas, the module system, var, improvements from Project Amber, ...),
  • API enhancements and
  • Performance improvements under the hood.

In addition, legacy features are regularly marked as “deprecated”, then as “deprecated for removal”, and later completely removed from the JDK.

In this series of articles, you will learn everything about the most important changes in each Java release.

Java 9 Features (with Examples)

All Java 9 features with examples: module system, jshell, List.of(), private interface methods, Flow API, Stack-Walking API, Process API, and more.

Java 10 Features (with Examples)

All new features of Java 10 with examples: “var”, Immutable Collections, Optional.orElseThrow(), Application Class-Data Sharing, and more.

Java 11 Features (with Examples)

All new features of Java 11 with examples: “var” in Lambdas, HttpClient, new String, Files, and Path methods, Epsilon GC, Flight Recorder, and more.

Java 12 Features (with Examples)

All new features of Java 12 with examples: new String and Files methods, Teeing Collector, Default CDS Archives, G1 optimizations, and more...

Java 13 Features (with Examples)

All new features of Java 13 with examples: Switch Expressions with yield, Text Blocks, Dynamic CDS Archives, Soft Max Heap Size, and more.

Java 14 Features (with Examples)

Java 14 features with examples: Switch Expressions, Helpful NullPointerExceptions, Previews: Records + Pattern matching for instanceof + more.

Java 15 Features (with Examples)

All the new features of Java 15 with examples: Text Blocks, ZGC + Shenandoah, new String methods, Sealed Classes (preview), and more...

Java 16 Features (with Examples)

Java 16 Features with examples: Records, “Pattern Matching for instanceof”, Stream.toList(), jpackage, Strong Encapsulation, and more.

Java 17 Features (with Examples)

Java 17 features (LTS) with examples: Sealed Classes, InstantSource, HexFormat, context-specific deserialization filters, and more.

Java 18 Features (with Examples)

Java 18 features with examples: UTF-8 by default, jwebserver, the @snippet tag in JavaDoc, Internet-Address Resolution SPI, and more.

Java 20 Features (with Examples)

The new Java 20 features with examples: Scoped Values, Record Patterns, Pattern Matching for switch, Virtual Threads, Structured Concurrency

Java 21 Features (with Examples)

All Java 21 features with examples: virtual threads, sequenced collections, record patterns, pattern matching for switch, and more.

Java 22 Features (with Examples)

Java 22 features with examples: Foreign Function & Memory API, unnamed variables & patterns, multi-file programs, Stream Gatherers + more.

Java 23 Features (with Examples)

All Java 23 features with examples: primitive type patterns, Markdown in JavaDoc, import modules, init fields in the constructor before super() + more!

Java 24 Features (with Examples)

Java 24 with code examples: Stream Gatherers, synchronized in virtual threads without pinning, AOT Class Loading, Compact Object Headers.

Java 25 Features (with Examples)

Java 25 (LTS): Scoped Values, Compact Source Files, Flexible Constructor Bodies, Compact Object Headers, and more – explained with examples.

Java 26 Features (with Examples)

Java 26 features (March 2026) with examples: HTTP/3, Lazy Constants, AOT caching with any GC, “final means final”, a faster G1, and more.

Java 27 Features (with Examples)

Java 27 explained – with code examples: Compact Object Headers by default, G1 everywhere, quantum-safe TLS, Lazy Sets and more.

Article Series “Files in Java”

What you’ll learn:

  • How to read and write text and binary files
  • Character encoding and line breaks
  • Constructing relative and absolute file and directory names with File, Path, and Paths
  • How to list all files of a directory, how to search files
  • How to move, rename, copy and delete files
  • Saving complex objects and primitive data types in binary files
  • Writing and reading files with FileChannel and ByteBuffer

Java Performance

This category deals with the performance of Java code, i.e., with which Java means a particular task can be executed most efficiently - possibly depending on the Java version. Not only is it important to know how to optimize code, but also when it is better to leave the optimization to the Java Runtime and the Hotspot Compiler.

Want Even More Knowledge?

My blog features many articles on Java, software architecture, and performance — from foundational concepts to advanced patterns.

If you want to go deeper, check out my trainings: hands-on, easy to understand, and directly applicable to your day-to-day project work. Instead of theory, I teach principles that help you write code that is better, more maintainable, and more performant in the long run.

Explore the Java Trainings

Search