Java (Java 25)
This assessment applies the coupling account — coupling as access to a shared resource, and the coupling floor [1], [2] — and the knowledge-embodiment theorem [3]; the language is assessed against its official reference [4].
Snapshot Java 25 — released 16 September 2025 · lifecycle supported (the current LTS line)
Family Java — shelf: Application
The language’s main business is building general application software, with a managed runtime or a rich standard library. A shelf groups; it does not classify — the tags below carry every use, paradigm, and platform of this snapshot.
Trajectory 1.4 (6 February 2002 — assertions and NIO; the last release before generics) · 5 (30 September 2004 — generics, annotations, enums) · 6 (11 December 2006 — library and performance release; no language change) · 7 (28 July 2011 — diamond, try-with-resources, invokedynamic) · 8 (18 March 2014 — lambdas and streams; LTS) · 11 (25 September 2018 — module system and var; LTS) · 17 (14 September 2021 — records and sealed types; LTS) · 21 (19 September 2023 — virtual threads; LTS) · 25 (16 September 2025 — scoped values and the compact source file; LTS) · 26 (17 March 2026 — runtime-only release) · 27 (15 September 2026 — runtime-only release)
Tags
Use — Application, Web back end, Desktop, Mobile
Paradigm — Object-oriented, Imperative, Concurrent
Platform — JVM, Mobile target
Lifecycle — Supported
Memory — Managed (GC)
Typing — Static, strong
Resources
The language’s official entry points, and the documents that name the release this page assesses. A link marked this release pins the document to Java 25; an unmarked link is the current reference for the language.
Landing page
Specification and reference
- Java Language and Virtual Machine Specifications
- The Java Language Specification, Java SE 25 Edition this release
API documentation
- Java SE API documentation
- Java SE 25 API documentation this release
Tutorial
1 Assessment
This page assesses Java in five parts: core coupling — what the language’s own constructs force; ecosystem coupling — what the surrounding platform, tooling, and community cost; engineering readiness — whether the artifact can be reproduced, verified, observed, worked in quickly, connected to other languages, and governed openly; the profile — the unscored facts a score cannot express; and the scoring detail — the mechanism marks and the arithmetic behind every score. A ✅ bullet marks a construct that helps. A ⚠️ or ❌ bullet marks a cost; the scoring model does not price every cost named here.
Core coupling 72.6/100 · Ecosystem coupling 78.5/100 · Engineering readiness 77.2/100
1.1 Core coupling
1.1.1 Type
- ✅ Interfaces decouple specification from implementation: A program is written against an interface, and an implementation is supplied at run time
- ✅ Generics enable type parameterization:
List<T>decouples a container from its element type - ✅ Records state their components (Java 16):
record Point(int x, int y)declares the data and the accessors together - ✅ Sealed types close a hierarchy (Java 17): A
sealedinterface names its implementations - ✅ Pattern matching for
switchis final (Java 21): Aswitchover a sealed type is checked for exhaustiveness - ✅ A module import declaration names the modules a file uses (Java 25): A source file states its dependencies without a
module-info - ⚠️ Type erasure couples generics: The run-time type argument is gone, so a consumer recovers it at a cast site the compiler cannot check (T7)
- ❌ Null is in every reference:
NullPointerExceptionis possible wherever a reference is used, and no non-nullable type says otherwise (T10) - ⚠️ Inheritance is available: Unchecked class extension couples a subclass to its superclass unless the class is
final - ❌ char is a UTF-16 code unit and String.length counts units (JLS); code-point APIs are the opt-in (T15)
1.1.2 Construction
- ✅ Dependency injection decouples construction from use: A framework supplies an object’s collaborators from outside the class
- ✅ A record is immutable by default (Java 16): A component is
final - ✅
List.ofandMap.ofbuild an immutable collection (Java 9): A literal collection is unmodifiable - ❌ A field is mutable unless declared
final: A setter is the ordinary way to change state (C2) - ❌ Collection order is unpinned: HashMap iterates in a hash-dependent order the specification does not fix, and the ordered map is the opt-in a disciplined team must choose (C5)
- ❌ One value, many names: every object is reached through references, an array’s buffer is shared by assignment, and no declaration names the alias set — a defensive copy is a discipline, not a type (C6)
- ❌ Class initialization is first-touch; JLS 12.4.1 documents the cycle: a thread observes zero fields, and a cycle can deadlock (C8)
1.1.3 Memory
- ✅ The JVM collects garbage: An unreachable object is reclaimed, so a program never frees memory by hand
- ✅ There is no manual deallocation: A dangling pointer cannot occur in managed code
- ❌ A collection pause is part of the timing: The collector’s schedule is not the program’s (M2)
- ✅ The Foreign Function and Memory API is final (Java 22): A native call is typed and its memory is scoped, so the boundary no longer needs JNI or
Unsafe - ⚠️ A large heap is a tuning decision: The collector’s pause target is chosen by flags, not by the program
1.1.4 Error
- ✅ A checked exception states a recoverable failure:
throws IOExceptionputs the failure in the signature - ❌ An unchecked exception bypasses the signature: A
RuntimeExceptioncan leave any method, so a caller cannot read the failure set from the type (Er2) - ❌ Try-catch does not compose: A failure is handled where it is caught, not mapped over (Er4)
- ✅ An exhaustive
switchover a sealed type (Java 21): The compiler verifies that every case is handled
1.1.5 Concurrency
- ✅ A thread pool is the unit of concurrency: A task is submitted to an executor
- ✅ Virtual threads are final (Java 21): A blocking task gets a thread that costs a fraction of an operating-system thread
- ✅ Scoped values are final (Java 25): Context is passed to a callee and released at the end of the scope, so a thread-local is not needed
- ⚠️ Structured concurrency is still a preview (Java 25): A scope that bounds a subtask’s lifetime is behind
--enable-preview - ✅ A task scope is a block:
ExecutorServiceisAutoCloseable, andclose()waits until every task submitted to it has completed, so a try-with-resources block joins the work it launched; the richerStructuredTaskScopeis still a preview (K4) - ✅
CompletableFuturecomposes asynchronous work: A stage chains a continuation - ⚠️ Shared mutable state is the default:
synchronized,volatile, and manual locks remain, and nothing detects a race (K3)
1.1.6 Platform
- ✅ The specifications are public: The Java Language Specification and the JVM Specification are standards any conforming implementation may implement
- ✅ Several vendor runtimes run the same class files: OpenJDK builds, Oracle JDK, Temurin, Corretto, and Zulu
- ✅ Bytecode is portable: A class file runs on every platform that hosts a JVM
1.1.7 Trade-offs (not coupling)
- Checked exceptions vs. composition: Explicit errors do not compose natively, though a sealed hierarchy is checkable
- Backward compatibility vs. modern features: Old codebases lag behind records, sealed types, and virtual threads
- Null as default vs. safety: Every reference can be null
- Type erasure vs. runtime types: A generic type argument is gone at run time
- Preview features vs. availability: The
StructuredTaskScopeAPI is still a preview, so production code waits, or joins through a block-scopedExecutorServicewhoseclose()is final but blunt — it waits for every task and reports no subtask’s failure
1.2 Ecosystem coupling
1.2.1 Performance
- ✅ The JIT optimises the hot path: A method is compiled after it proves hot
- ⚠️ A GC pause is part of the timing: The collector decides when memory returns (R2)
- ⚠️ Startup pays for interpretation: A cold JVM interprets until the JIT compiles (R3)
- ✅ Mature profilers and monitoring: VisualVM, JFR, and the platform tooling
1.2.2 Ecosystem
- ✅ Maven Central is the registry: A dependency is declared in a POM or a Gradle build and resolved from the central repository
- ⚠️ Spring dominates the server stack: The alternatives are not really alternatives (Ec6)
- ⚠️ The ecosystem carries old APIs: The enterprise stack keeps 1990s-era interfaces in service beside a current one (Ec7)
- ✅ The IDE and build tools are mature: IntelliJ, Eclipse, Maven, and Gradle
- ✅ The class file carries a published promise across JDK releases [4] (Ec8)
- ✅ Serialized objects cross on a published promise: the stream carries the format version and a per-class serial version UID, and the specification states the current protocol is fully backward and forward compatible, read by JDK 1.1.7 and later [5] (Ec9)
1.2.3 Evolution
- ✅ Backward compatibility is strong: A class file from an older release still runs
- ✅ Java 25 is the current LTS: A production line that must stay on an LTS lands here, and the next LTS is Java 29
1.2.4 Domain
- ✅ Excellent for backend and enterprise work: The standard choice for a large service
- ✅ Android runs it: A primary language on the platform, with Kotlin
- ✅ Strong for distributed systems: Mature frameworks and a mature runtime
- ⚠️ Front end is out of scope: The applet is gone from the browser, and JavaFX is niche
- ⚠️ Systems programming is out of reach: A collector and a managed runtime
1.2.5 Learning
- ✅ Widely taught: Courses, books, and a large body of examples
- ✅ The documentation is exhaustive: Javadoc and the tutorials
- ⚠️ The surface is large: The language, the standard library, and the enterprise APIs (L2)
1.2.6 Syntax
- ✅ A
switchexpression returns a value (Java 14): The arrow form states a mapping and removes the fall-through - ✅ A compact source file needs no class (Java 25): A small program is one file with an instance
main - ✅ A record pattern destructures a value (Java 21):
case Point(int x, int y)reads the components without accessors - ⚠️ A generic type and a checked exception are spelled out: The signature stays long
1.2.7 Testing
- ✅ JUnit is the standard test runner: Mature and ubiquitous
- ✅ Mocking frameworks are mature: Mockito and EasyMock
- ✅ Excellent debuggers: Step-through and breakpoints in the IDE and on the command line
1.2.8 Security
- ✅ Memory safe: The collector prevents a use after free
- ✅ Type safe: A static check runs before the program
- ✅ The module system restricts reflection (Java 9): A non-exported package is not open by default
- ⚠️ Deserialization is an attack path: A crafted stream constructs an object graph the program did not choose
- ⚠️ A null check is the caller’s: A reference can be null, and nothing states the guard
- ❌ Integer arithmetic is two’s-complement wraparound by specification (JLS 15.7.2), silent in a shipped build (Q4)
1.2.9 Delivery targets
What ships from a producer to a consumer, and whether the interface across a release boundary is promised. Ec8 is present when one compiled target crosses with no promise.
| Target | Ships as | Crosses a producer boundary | Cross-release promise |
|---|---|---|---|
| jar — Java class files | compiled | yes | yes — The class-file format and the binary compatibility rules are published by the JVM specification [4] |
1.2.10 Stored data formats
What the toolchain stores that outlives the program, and what the vendor publishes about reading it across a release boundary. Ec9 is present when one row carries a break: the reading promise published as broken, the writing direction published as unreadable elsewhere, or a break the probe harness has reproduced.
| Stored format | Reading promise | Writing promise |
|---|---|---|
| Serialized objects — Java serialization stream | yes — Java’s serialization specification publishes the stream protocol: the stream carries the magic number and version, every class descriptor carries a serial version UID, the writer can select a protocol version, the current protocol is stated fully backward and forward compatible, and JDK 1.1.7 and later read both protocol versions [5] | — |
1.3 Engineering readiness
1.3.1 Reproducibility
- ❌ No contract the toolchain reads: the JDK compiler consumes the command line, and the dependency contract lives in third-party build tooling the platform does not ship (Y18)
1.3.2 Supply chain
- ⚠️ The JDK ships no package channel: jars move through Maven Central, a third-party repository whose terms are its own.
1.3.3 Observability
- ✅ JDK Flight Recorder ships a stable recording standard for latency, allocation, and method sampling in the JVM itself. (Y5)
- ✅ The runtime writes hs_err_pid files, thread dumps, and heap dumps by default, so a crash carries its own post-mortem. (Y15)
1.3.4 Feedback
- ✅ The compiler reports an error in the editor: An IDE compiles a file as it is saved, so a type error is reported without a build
1.3.5 Interop
- ✅ JNI is the in-process foreign interface, and the Foreign Function and Memory API modernizes it. (Y9)
- ✅ The JVM is the portable target: the artifact runs wherever a compatible JVM runs. (Y10)
1.3.6 Governance
- ✅ The Java Community Process runs the language evolution through public JSRs and expert groups. (Y11)
- ✅ The Java Language Specification is published and complete. (Y12)
- ✅ The JCK conformance kit runs against every licensed implementation. (Y17)
- ✅ javac and the JDK libraries are public source in OpenJDK. (Y19)
1.4 Profile
Unscored, and kept separate from every score on purpose. The profile records what a mechanism price cannot express: what a running program costs, how well a coding model and an agent work in the language, and whether a safety-critical path exists.
1.4.1 Energy and cost
What this axis asks: what does a running program cost in energy and time?
1.4.2 AI and agent readiness
What this axis asks: how well does a coding model and an agent work in this language?
1.4.3 Safety certification
What this axis asks: is there a certified or standards-qualified path to a safety-critical system?
- ✅ A standards-qualified toolchain or an established safety standard covers this language.
1.5 Scoring detail
1.5.1 Core coupling Dimensions
| Dimension | Mechanism | Description | Imposed by | Present | Weight |
|---|---|---|---|---|---|
| Type | T1 |
dynamic no static check | language | — | 0 |
T2 |
weak static | language | — | 0 | |
T3 |
dynamic/duck dispatch | language | — | 0 | |
T4 |
no sum types | language | — | 0 | |
T5 |
no generics | language | — | 0 | |
T6 |
no namespaces | language | — | 0 | |
T7 |
type erasure/reflection | language | ✅ | −4 | |
T8 |
operator overloading | language | — | 0 | |
T9 |
inheritance required for polymorphism | language | — | 0 | |
T10 |
no null-safety | language | ✅ | −8 | |
T11 |
no module boundary | language | — | 0 | |
T12 |
no effect tracking | language | ✅ | −8 | |
T13 |
async/sync colouring | language | — | 0 | |
T14 |
unchecked foreign boundary | language | ✅ | −4 | |
T15 |
chars are encoding units | language | ✅ | −8 | |
| Type cost | −9.1 (−32) | ||||
| Construction | C1 |
global mutable state by default | language | — | 0 |
C2 |
no immutability by default | language | ✅ | −4 | |
C3 |
constructors coupled to allocation | language | — | 0 | |
C4 |
no constructor/validation | language | — | 0 | |
C5 |
unpinned collection order | language | ✅ | −4 | |
C6 |
aliasing by default | language | ✅ | −8 | |
C7 |
undeclared control transfer | language | — | 0 | |
C8 |
no source-visible init order | language | ✅ | −8 | |
| Construction cost | −6.9 (−24) | ||||
| Memory | M1 |
manual deallocation | runtime | — | 0 |
M2 |
GC non-deterministic pauses | runtime | ✅ | −8 | |
M3 |
no RAII | language | ✅ | −4 | |
M4 |
no ownership model | language | ✅ | −8 | |
M5 |
uninitialized reads | language | — | 0 | |
M6 |
unchecked reinterpretation | language | — | 0 | |
Er6 |
uncatchable runtime fault | language | — | 0 | |
M7 |
reference cycles leak | runtime | — | 0 | |
| Memory cost | −5.7 (−20) | ||||
| Error | Er1 |
no structured path | language | — | 0 |
Er2 |
unchecked exceptions only | language | ✅ | −8 | |
Er3 |
errors ignored/non-exhaustive | language | — | 0 | |
Er4 |
no composable result type | language | ✅ | −4 | |
Er5 |
no isolation unit for a fault | runtime | — | 0 | |
| Error cost | −3.4 (−12) | ||||
| Concurrency | K1 |
GIL/no parallel | runtime | — | 0 |
K2 |
shared mutable state default | language | — | 0 | |
K3 |
manual sync no race detection | runtime | ✅ | −8 | |
K4 |
no structured concurrency | language | — | 0 | |
K5 |
no primitives | language | — | 0 | |
K6 |
thread-per-task cost | runtime | — | 0 | |
| Concurrency cost | −2.3 (−8) | ||||
| Platform | P1 |
cannot function outside one vendor/domain | context | — | 0 |
P2 |
single-vendor but other uses | context | — | 0 | |
P3 |
legacy/discontinued platform | context | — | 0 | |
P4 |
poor domain fit | context | — | 0 | |
| Platform cost | 0 |
Core coupling score: 72.6/100 — 96 of the 350 inventory points are present, so the axis cost is 100 × 96 ÷ 350 = 27.4 and the score is 100 − 27.4. Each dimension’s cost above is its share of the same denominator, and the raw weight sum follows in parentheses.
1.5.2 Ecosystem coupling Dimensions
| Dimension | Mechanism | Description | Imposed by | Present | Weight |
|---|---|---|---|---|---|
| Performance | R1 |
interpreted no AOT/JIT | runtime | — | 0 |
R2 |
GC pauses | runtime | ✅ | −8 | |
R3 |
JIT warmup | runtime | ✅ | −4 | |
| Performance cost | −4.7 (−12) | ||||
| Ecosystem | Ec1 |
no package manager | context | — | 0 |
Ec2 |
fragmented tooling | context | — | 0 | |
Ec3 |
small/niche/discontinued | context | — | 0 | |
Ec4 |
proprietary | context | — | 0 | |
Ec5 |
platform-locked tooling | context | — | 0 | |
Ec6 |
monoculture | context | ✅ | −8 | |
Ec7 |
legacy burden | context | ✅ | −8 | |
Ec8 |
unpromised binary boundary | context | — | 0 | |
Ec9 |
unpromised data boundary | context | — | 0 | |
| Ecosystem cost | −6.2 (−16) | ||||
| Evolution | V1 |
breaking changes | language | — | 0 |
V2 |
frozen | context | — | 0 | |
V3 |
discontinued | context | — | 0 | |
V4 |
glacial standards | context | — | 0 | |
V5 |
silent default drift | runtime | — | 0 | |
V7 |
build-variant state space | context | — | 0 | |
| Evolution cost | 0 | ||||
| Domain | D1 |
domain/vendor lock-in | context | — | 0 |
D3 |
framework forces architecture | context | ✅ | −8 | |
| Domain cost | −3.1 (−8) | ||||
| Learning | L1 |
steep | context | — | 0 |
L2 |
large surface/multi-paradigm | context | ✅ | −4 | |
L3 |
sparse docs | context | — | 0 | |
| Learning cost | −1.6 (−4) | ||||
| Syntax | S1 |
verbose | language | — | 0 |
S2 |
inconsistent | language | — | 0 | |
S3 |
punctuation-heavy | language | — | 0 | |
| Syntax cost | 0 | ||||
| Testing | G1 |
weak tooling | context | — | 0 |
G2 |
poor debugging | context | — | 0 | |
G3 |
runtime-only errors | context | — | 0 | |
G4 |
no published monotonic clock | runtime | — | 0 | |
| Testing cost | 0 | ||||
| Security | Q1 |
memory-unsafe | language | — | 0 |
Q2 |
dynamic/weak typing risk | language | — | 0 | |
Q3 |
known vulnerability/injection | context | — | 0 | |
Q4 |
silent integer overflow | language | ✅ | −15 | |
| Security cost | −5.9 (−15) |
Ecosystem coupling score: 78.5/100 — 55 of the 256 inventory points are present, so the axis cost is 100 × 55 ÷ 256 = 21.5 and the score is 100 − 21.5. Each dimension’s cost above is its share of the same denominator, and the raw weight sum follows in parentheses.
1.5.3 Engineering readiness Dimensions
| Dimension | Mechanism | Description | Imposed by | Present | Weight |
|---|---|---|---|---|---|
| Reproducibility | Y1 |
build not reproducible | context | ✅ | −15 |
Y2 |
dependencies not pinned | context | ✅ | −8 | |
Y14 |
no toolchain version pin | context | ✅ | −8 | |
Y18 |
no machine-read project contract | context | ✅ | −8 | |
| Reproducibility cost | −22.8 (−39) | ||||
| Supply chain | Y3 |
no signed provenance | context | — | 0 |
Y4 |
registry without namespacing | context | — | 0 | |
Y16 |
no advisory feed | context | — | 0 | |
| Supply chain cost | 0 | ||||
| Observability | Y5 |
no stable tracing standard | context | — | 0 |
Y6 |
no structured logging | context | — | 0 | |
Y15 |
no post-mortem diagnostics | runtime | — | 0 | |
| Observability cost | 0 | ||||
| Feedback | Y7 |
slow build | context | — | 0 |
Y8 |
no fast in-editor analysis | context | — | 0 | |
Y13 |
no bundled debugger | context | — | 0 | |
| Feedback cost | 0 | ||||
| Interop | Y9 |
no foreign-function interface | language | — | 0 |
Y10 |
no portable target | context | — | 0 | |
| Interop cost | 0 | ||||
| Governance | Y11 |
single-vendor governance | context | — | 0 |
Y12 |
closed specification | context | — | 0 | |
Y17 |
no conformance mechanism | context | — | 0 | |
Y19 |
no published parser | context | — | 0 | |
| Governance cost | 0 |
Engineering readiness score: 77.2/100 — 39 of the 171 inventory points are present, so the axis cost is 100 × 39 ÷ 171 = 22.8 and the score is 100 − 22.8. Each dimension’s cost above is its share of the same denominator, and the raw weight sum follows in parentheses.
Verdict: Java 25 is the current LTS, and it consolidates the platform rather than changing its shape: scoped values are final, the foreign-function API is stable, and a compact source file makes a small program one file. The coupling profile is Java 21’s: records, sealed types, exhaustive patterns, and virtual threads on one side; null, erasure, unchecked failures in practice, and a Spring-shaped ecosystem on the other. Main strength: the modern toolkit is now the stable default of a long-lived line. Main weakness: the same three mechanisms the language has never removed.
Note: The score reflects Java 25’s language: scoped values are final; the block-scoped
ExecutorServiceis final; the richerStructuredTaskScopeis still a preview.
Construct guidance: which constructs this release makes obsolete, and what to write instead, is in The Modern Java Subset.
The formal development. The definitions, theorems, and proofs behind this page are published in:
- On the Nature of Coupling: All Coupling as Shared Resource Access — Zenodo, 2026 — doi:10.5281/zenodo.21925122
- Coupling as a Consequence of Cohesion: Decomposition, the Coupling Floor, and Domain-Imposed Coupling — Zenodo, 2026 — doi:10.5281/zenodo.21925201
- On the Nature of Cohesion: Cohesion as Correctness Relative to a Partitioning Rule — Zenodo, 2026 — doi:10.5281/zenodo.21703193