Java 17 & 18. What's new and noteworthy
summary
Java 17 ships as LTS with about 14 JEPs and Java 18 follows with 9 JEPs; notable concrete changes: sealed classes are standard (compiler-enforced permits and non-sealed options), strong encapsulation removes the old illegal-access permits flag so reflection hacks must be fixed or run on Java 16, finalize is deprecated for removal, UTF‑8 becomes default (watch Windows file encoding), and a foreign function & memory API demo shows native memory segments, thread confinement errors and a downcall to getuid returning 1000; Java 18 also adds a tiny programmatic simple web server, pattern‑matching for switch (no fall‑through, guards), and enhanced PRNGs.
AI-written summary · about
chapters (17)
- 0:00Introduction
- 1:13Java 17 and 18 overview
- 4:21LTS vs non-LTS releases
- 10:24Sealed classes in Java 17
- 23:29Strongly encapsulated JDK internals
- 33:44UTF-8 as default encoding
- 39:02Deprecating finalization
- 46:05Simple web server in Java 18
- 52:05Code snippets in Javadoc
- 57:01Preview features in Java
- 59:07Pattern matching for switch
- 1:16:16Foreign function and memory API
- 1:35:18Enhanced pseudo-random generators
- 1:37:23Strict floating-point semantics
- 1:39:09Deserialization filters
- 1:40:12Deprecations and removals
- 1:43:25Feedback and conclusion
