Java glossary – key terms explained
Bytecode
Platform-independent intermediate code in .class files that javac produces and the JVM executes.
Checked exception
An exception that the compiler forces you to catch or declare with throws (e.g. IOException); the opposite: unchecked (RuntimeException).
Functional interface
An interface with exactly one abstract method (e.g. Runnable, Function, Comparator); target for lambdas.
Garbage collector
Automatically frees the memory of objects that are no longer reachable (e.g. G1, ZGC).
Generics
Type parameters such as List<String> that provide type safety at compile time; erased at runtime (type erasure).
Heap / stack
The heap holds all objects, the stack holds, per thread, the method calls with local variables.
JDK / JRE
The JDK (Development Kit) contains the compiler, tools and runtime. The JRE is only the runtime environment.
JIT compiler
The JVM's just-in-time compiler: translates frequently used bytecode into optimized machine code at runtime.
JUnit
The standard framework for unit tests in Java: @Test, assertEquals, assertThrows.
JVM
Java Virtual Machine: executes bytecode, manages memory and compiles hot spots to machine code via JIT.
Lambda
A short anonymous function such as x -> x * 2 that fits a functional interface.
Maven / Gradle
Build tools that download dependencies, compile, test and build JAR files.
Optional
A container that can hold a value or be empty – the type-safe alternative to null for return values.
Pattern matching
Checking and destructuring values in instanceof and switch: case Kreis k ->, case Add(var l, var r) ->.
Record
A compact immutable data class (Java 16+) with an automatically generated constructor, equals, hashCode and toString.
sealed
A modifier (Java 17) that defines the permitted subtypes of a class or interface (permits).
Stream
A pipeline for declarative data processing with filter, map, collect etc.; lazy and usable only once.
Text block
A multi-line string in three quotation marks (""") with automatic removal of indentation.
try-with-resources
try (var r = ...) { }: automatically closes AutoCloseable resources in reverse order.
Virtual thread
A lightweight thread managed by the JVM (Java 21), ideal for many blocking I/O tasks.