Skip to content

Syntax reference

The reference is organized by concept rather than by the repository's historical package names.

Topic What it covers
Language fundamentals Types, variables, arrays, methods, and classes
Operators Arithmetic, comparison, logical, bitwise, and conditional operators
Control flow Selection, iteration, and transfer statements
Objects and interfaces Encapsulation, inheritance, abstraction, and contracts
Generics Type parameters, bounds, wildcards, and erasure
Exceptions Checked and unchecked exceptions and resource handling
Lambdas Functional interfaces, lambda syntax, and method references
Streams Pipelines, intermediate operations, terminals, and collectors
Date and time Legacy APIs and java.time
Concurrency Threads, synchronization, futures, and modern concurrency

Version labels

  • Stable: standard supported Java behavior.
  • Legacy: retained for comparison or maintenance work.
  • Preview: requires --enable-preview for the repository's configured JDK.
  • Internal: uses unsupported JDK implementation APIs.