Java SE 14
2020. 3. 17 Released.
Summary
- JEP 305:
instnaceof를 위한 패턴 매칭 (Preview) - JEP 343: Packaging Tool (Incubator)
- JEP 345: NUMA-Aware Memory Allocation for G1
- JEP 349: JFR Event Streaming
- JEP 352: Non-Volatile Mapped Byte Buffers
- JEP 358: Helpful NullPointerExceptions
- JEP 359: Records (Preview)
- JEP 361:
switch표현 (Standard) - JEP 362:
Solaris and SPARC Portsdeprecated - JEP 363:
Concurrent Mark Sweep (CMS) Garbage Collector - JEP 364: ZGC on macOS
- JEP 365: ZGC on Windows
- JEP 366:
ParallelScavenge + SerialOld GC Combinationdeprecated - JEP 367:
Pack200 Tools and API - JEP 368: Text Blocks (Second Preview)
- JEP 370: Foreign-Memory Access API (Incubator)
Description
- JEP 305: *Pattern Matching for instanceof* (Preview)
if (obj instanceof String) { String s = (String) obj; System.out.println(s.length()); } if (obj instanceof String s) { System.out.println(s.lenght9)); }
- JEP 343: Packaging Tool (incubator)
- JEP 345: NUMA-Aware Memory Allocation for G1
- JEP 349: JFR Event Streaming
- JEP 352: Non-Volatile Mapped Byte Buffers
- JEP 358: Helpful NullPointerExceptions
- JEP 359: *Records* (Preview)
- `record` data class (like. tuple)
record Point (int x, int y) {} // data object Point p = new Point(3, 4); System.out.println(p.x()); public record Range(int lo, int hi) { public Range(int lo, int hi) { if (lo > hi) throw new IllegalArgumentException(String.format("%d, %d", lo, hi)); this.lo = lo; this.hi = hi; } }
- JEP 361: Switch Expressions (Standard)
- JEP 362: Deprecate the Solaris and SPARC Ports
- JEP 363: Remove the ~~Concurent Mark Sweep(CMS) Garbage Collector~~
- JEP 364: ZGC on macOS
- JEP 365: ZGC on Windows
- JEP 366: Deprecate the ParallelScavenge + SerialOld GC Combination
- JEP 367: Remove the ~~Pack200 Tools and API~~
- JEP 368: *Text Blocks* (Second Preview)
- JEP 370: Foreign-Memory Access API (Incubator)