1.jdk最新版本
截止目前,jdk版本已经更新到14
2.jdk14新特性
https://openjdk.java.net/projects/jdk/14/
–openjdk网站我们可以看到有以下16大特性
305: Pattern Matching for instanceof (Preview)
343: Packaging Tool (Incubator)
345: NUMA-Aware Memory Allocation for G1
349: JFR Event Streaming
352: Non-Volatile Mapped Byte Buffers
358: Helpful NullPointerExceptions
359: Records (Preview)
361: Switch Expressions (Standard)
362: Deprecate the Solaris and SPARC Ports
363: Remove the Concurrent Mark Sweep (CMS) Garbage Collector
364: ZGC on macOS
365: ZGC on Windows
366: Deprecate the ParallelScavenge + SerialOld GC Combination
367: Remove the Pack200 Tools and API
368: Text Blocks (Second Preview)
370: Foreign-Memory Access API (Incubator)
下面我们就常用到的特性改变举例看一下
1.305: Pattern Matching for instanceof (Preview) instanceof新特性