Java – How-Tos and Tutorials

On this page, you find an overview of how-tos and tutorials about Java.

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.

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.

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.

Article series "Files in Java"

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.