All Classes and Interfaces

Class
Description
Explains ahead-of-time class loading and linking, introduced in Java 24.
Explains Java 25 ahead-of-time command-line ergonomics and method profiling.
Explains the Class-File API, finalized in Java 24.
Explains the Class-File API, introduced as a Java 22 preview feature.
Explains the Class-File API as a Java 23 second preview feature.
Explains JavaDoc code snippets introduced in Java 18.
Demonstrates collection factory methods introduced in Java 9.
Demonstrates compact number formatting, introduced in Java 12.
Explains compact object headers in Java 25.
Explains compact source files and instance main methods, finalized in Java 25.
Demonstrates CompletableFuture, introduced in Java 8 to make asynchronous work easier to compose.
Demonstrates the Date and Time API introduced in Java 8 under java.time.
Demonstrates default methods, introduced in Java 8 so interfaces could evolve without forcing every existing implementation to add new methods immediately.
Implementation that overrides a default method while keeping the others.
Interface with one abstract method and two default methods.
Implementation that inherits all default behavior from DefaultMethodExamples.Named.
Demonstrates file convenience methods introduced in Java 11.
Demonstrates Files.mismatch(Path, Path), introduced in Java 12.
Demonstrates the FileSystems.newFileSystem(Path) convenience overload added in Java 13.
Demonstrates flexible constructor bodies, finalized in Java 25.
Simple account model used to demonstrate validation before constructor delegation.
Explains flexible constructor bodies as a Java 23 second preview feature.
Explains flexible constructor bodies third preview in Java 24.
Explains the Foreign Function and Memory API, finalized in Java 22.
Explains the Foreign Function and Memory API as a Java 19 preview feature.
Explains the Foreign Function and Memory API second preview in Java 20.
Explains Generational Shenandoah introduced in Java 25.
Demonstrates helpful NullPointerException messages, introduced in Java 14.
Address with a city value used by the null-pointer diagnostic example.
Customer with an address reference used to trigger nested null access.
Demonstrates HexFormat, introduced in Java 17.
Explains hidden classes, introduced in Java 15.
Demonstrates the standard HTTP Client API finalized in Java 11.
Explains the Internet-address resolution SPI introduced in Java 18.
 
Explains Java Flight Recorder enhancements introduced in Java 25.
Explains the Key Derivation Function API, finalized in Java 25.
Explains the Key Derivation Function API preview in Java 24.
Explains the Key Encapsulation Mechanism API introduced in Java 21.
Demonstrates lambda expressions, one of the main language features introduced in Java 8.
Simple functional interface used to demonstrate passing behavior into a method.
Demonstrates var in lambda parameters, introduced in Java 11.
Marker annotation used only to demonstrate annotating an inferred lambda parameter.
Explains launching multi-file source-code programs, introduced in Java 22.
Demonstrates local variable type inference, introduced in Java 10 through the var reserved type name.
Explains Markdown documentation comments, introduced in Java 23.
Demonstrates method references, introduced in Java 8 as a compact syntax for lambdas that only call an existing method or constructor.
Simple formatter used to demonstrate a bound instance method reference.
Small Java 8-style data class used by constructor reference examples.
Explains module import declarations, finalized in Java 25.
Explains module import declarations as a Java 23 preview feature.
Explains module import declarations second preview in Java 24.
Explains the Java Platform Module System (JPMS), introduced in Java 9.
Demonstrates Optional methods added in Java 9.
Demonstrates Optional, introduced in Java 8 as a container for values that may be absent.
Small Java 8-style data class used by the Optional examples.
Demonstrates Optional.isEmpty(), introduced in Java 11.
Demonstrates the no-argument Optional.orElseThrow() method added in Java 10.
Demonstrates pattern matching for instanceof, finalized in Java 16.
Demonstrates pattern matching for instanceof as a Java 14 preview feature.
Demonstrates pattern matching for switch, finalized in Java 21.
Closed command hierarchy used to demonstrate exhaustive switch handling.
Restarts a service.
Starts a service.
Stops a service.
Demonstrates pattern matching for switch as refined in the Java 20 fourth preview.
Demonstrates pattern matching for switch as a Java 17 preview feature.
Demonstrates the continued preview of pattern matching for switch in Java 19.
 
 
 
Explains PEM encodings of cryptographic objects as a Java 25 preview feature.
Demonstrates Predicate.not(Predicate), introduced in Java 11.
Explains primitive types in patterns, instanceof, and switch as a Java 23 preview feature.
Explains primitive patterns second preview in Java 24.
Explains primitive patterns third preview in Java 25.
Demonstrates private methods in interfaces, introduced in Java 9.
Empty implementation that receives behavior from interface default methods.
Interface with default methods that share private helper logic.
Demonstrates Process API updates introduced in Java 9.
Small Java 9-style data class for process metadata.
Explains quantum-resistant ML-KEM and ML-DSA support introduced in Java 24.
Demonstrates the enhanced pseudo-random number generator API introduced in Java 17.
Demonstrates records, finalized in Java 16.
Simple record with generated accessors and value equality.
Record with a compact constructor for validation.
Demonstrates record patterns, finalized in Java 21.
Point record used by the nested deconstruction example.
Rectangle record made of two points.
Demonstrates record patterns as a Java 19 preview feature.
Small record used by the record pattern example.
Demonstrates record patterns as refined in the Java 20 second preview.
Address record nested inside RecordPatternsSecondPreviewExamples.Customer.
Customer record used to demonstrate nested record deconstruction.
Demonstrates records as a Java 14 preview feature.
Compact data carrier used to demonstrate record syntax.
Demonstrates scoped values, finalized in Java 25 by JEP 506.
Explains scoped values fourth preview in Java 24.
Explains scoped values, introduced as an incubating API in Java 20.
Explains scoped values as a Java 21 preview feature.
Explains scoped values as a Java 22 second preview feature.
Explains scoped values as a Java 23 third preview feature.
Demonstrates sealed classes, finalized in Java 17.
Final permitted implementation.
Final permitted implementation.
Sealed parent interface that permits only the listed implementations.
Non-sealed implementation, showing that a permitted subtype may reopen the hierarchy.
Demonstrates sealed classes as a Java 15 preview feature.
Circle implementation permitted by SealedClassesPreviewExamples.Shape.
Rectangle implementation permitted by SealedClassesPreviewExamples.Shape.
Sealed parent type that explicitly lists permitted implementations.
Explains the Security Manager being permanently disabled in Java 24.
Demonstrates sequenced collections, introduced in Java 21.
Explains the simple web server introduced in Java 18.
Explains stable values as a Java 25 preview feature.
Demonstrates StackWalker, introduced in Java 9.
Explains statements before super(...) as a Java 22 preview feature.
Demonstrates Stream API enhancements introduced in Java 9.
Demonstrates the Stream API introduced in Java 8.
Small Java 8-style data class used by the stream examples.
Demonstrates Stream Gatherers, finalized in Java 24.
Explains Stream Gatherers, introduced as a Java 22 preview feature.
Explains Stream Gatherers as a Java 23 second preview feature.
Demonstrates Stream.toList(), introduced in Java 16.
Demonstrates String API additions introduced in Java 11.
Demonstrates String.indent(int), introduced in Java 12.
Explains strong encapsulation of JDK internals in Java 17.
Explains structured concurrency fifth preview in Java 25.
Explains structured concurrency fourth preview in Java 24.
Explains structured concurrency as an incubating feature in Java 19.
Explains structured concurrency as a Java 21 preview feature.
Explains structured concurrency as a Java 20 second incubator feature.
Explains structured concurrency as a Java 22 second preview feature.
Explains structured concurrency as a Java 23 third preview feature.
Demonstrates switch expressions, finalized in Java 14.
Demonstrates switch expressions as a Java 12 preview feature.
Demonstrates yield in switch expressions as a Java 13 preview refinement.
Small Java 12-style data class for teeing collector results.
Demonstrates text blocks, finalized in Java 15.
Demonstrates text blocks as a Java 13 preview feature.
Demonstrates the Java 9 try-with-resources improvement.
Explains Unix-domain socket channel support, introduced in Java 16.
Demonstrates unmodifiable collectors introduced in Java 10.
Small Java 10-style data class used by the collector examples.
Demonstrates unnamed patterns and variables as a Java 21 preview feature.
Demonstrates unnamed variables and patterns, finalized in Java 22.
Small functional interface used to demonstrate an ignored lambda parameter.
Explains the Java 23 deprecation of memory-access methods in sun.misc.Unsafe.
Demonstrates UTF-8 as the default charset, standardized in Java 18.
Explains the Vector API fifth incubator in Java 20.
Explains Vector API tenth incubator in Java 25.
Demonstrates virtual threads, finalized in Java 21.
Demonstrates virtual threads as a Java 19 preview feature.
Explains virtual threads as a Java 20 second preview feature.
Explains Java 24 synchronization improvements for virtual threads.
Explains ZGC generational mode becoming the default in Java 23.