java25
4 tutorials tagged “java25”.
- Compact Object Headers in Java 25Java 25 can shrink object headers from 12 to 8 bytes with -XX:+UseCompactObjectHeaders. Learn how it works, measure the savings, and when to turn it on.
- Primitive Types in Patterns (Preview)A Java 25 preview: primitive type patterns in switch and instanceof, switching on long, double and boolean, and safe exactness checks for conversions.
- Scoped Values in JavaScoped values (final in Java 25) share immutable data with called code for a bounded scope. Learn ScopedValue.where, run, get and nesting, vs ThreadLocal.
- Structured Concurrency in JavaStructured concurrency (preview in Java 25) treats related subtasks as one unit with StructuredTaskScope: fork, join, and automatic cancellation when one fails.