JDK1.5
1:自动装箱与拆箱
2:枚举
3:静态导入
4:可变参数(Varargs)
5:内省(Introspector)
6:泛型(Generic)
7.For-Each循环
JDK 1.6
1:Desktop类和SystemTray类
2:使用JAXB2来实现对象与XML之间的映射
3:理解StAX
4.使用Compiler API
5:轻量级Http Server API
6:插入式注解处理API(Pluggable Annotation Processing API)
7:用Console开发控制台程序
8:对脚本语言的支持如: ruby, groovy, javascript
9:Common Annotations
JDK 1.7
1:switch中可以使用字串
2:"<>“这个玩意儿的运用List tempList = new ArrayList<>(); 即泛型实例化类型自动推断
3:自定义自动关闭类
4:新增一些取环境信息的工具方法
5:Boolean类型反转,空指针安全,参与位运算
6: 两个char间的equals
7:安全的加减乘除
8:对Java集合(Collections)的增强支持
9:数值可加下划线
10:支持二进制文字
11:简化了可变参数方法的调用
12:在try catch异常扑捉中,一个catch可以写多个异常类型,用”|"隔开
13:jdk7之前,你必须用try{}finally{}在try内使用资源,在finally中关闭资源,不管try中的代码是否正常退出或者异常退出。jdk7之后,你可以不必要写finally语句来关闭资源,只要你在try()的括号内部定义要使用的资源
JDK 1.8
1:接口的默认方法
2:Lambda 表达式
3:函数式接口
4:方法与构造函数引用
5:Lambda 作用域
6:访问局部变量
7:访问对象字段与静态变量
8:访问接口的默认方法
9:Date API
10:Annotation 注解
JDK1.9
Java平台级模块系统响应式编程模型ReactiveLinkingJShell:交互式Java REPL改进的Javadoc集合工厂方法改进的Stream API私有接口方法HTTP/2多版本兼容JARJDK10
局部变量类型推断
应用类数据共享(CDS)
额外的 Unicode 语言标签扩展
基于时间的版本控制
根证书
并行全垃圾回收器 G1
移除 Native-Header 自动生成工具
垃圾回收器接口
线程-局部变量管控
在备用存储装置上的堆分配
试验性的基于 Java 的 JIT 编译器
合并 JDK 多个代码仓库到一个单独的储存库中
JDK11
1、本地变量类型推断
2、字符串加强
3、集合加强
4、Stream 加强
5、Optional 加强
6、InputStream 加强
7、HTTP Client API
8、化繁为简,一个命令编译运行源代码
JDK12
1.Shenandoah:低暂停时间的 GC(实验性功能)
2.微基准测试套件
3.Switch 表达式(预览功能)
4.JVM 常量 API
5.只保留一个 AArch64 实现
6.默认类数据共享归档文件
7.可中止的 G1 混合 GC
8.G1 及时返回未使用的已分配内存
JDK13
1: Dynamic CDS Archives
2.: ZGC: Uncommit Unused Memory
3: Reimplement the Legacy Socket API
4: Switch Expressions (Preview)
5: Text Blocks (Preview)
JDK 14
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)
JDK 15
339: Edwards-Curve Digital Signature Algorithm (EdDSA)
360: Sealed Classes (Preview)
371: Hidden Classes
372: Remove the Nashorn JavaScript Engine
373: Reimplement the Legacy DatagramSocket API
374: Disable and Deprecate Biased Locking
375: Pattern Matching for instanceof (Second Preview)
377: ZGC: A Scalable Low-Latency Garbage Collector
378: Text Blocks
379: Shenandoah: A Low-Pause-Time Garbage Collector
381: Remove the Solaris and SPARC Ports
383: Foreign-Memory Access API (Second Incubator)
384: Records (Second Preview)
385: Deprecate RMI Activation for Removal
JDK 16
338: Vector API (Incubator)
347: Enable C++14 Language Features
357: Migrate from Mercurial to Git
369: Migrate to GitHub
376: ZGC: Concurrent Thread-Stack Processing
380: Unix-Domain Socket Channels
386: Alpine Linux Port
387: Elastic Metaspace
388: Windows/AArch64 Port
389: Foreign Linker API (Incubator)
390: Warnings for Value-Based Classes
392: Packaging Tool
393: Foreign-Memory Access API (Third Incubator)
394: Pattern Matching for instanceof
395: Records
396: Strongly Encapsulate JDK Internals by Default
397: Sealed Classes (Second Preview)
JDK 17
306: Restore Always-Strict Floating-Point Semantics
356: Enhanced Pseudo-Random Number Generators
382: New macOS Rendering Pipeline
391: macOS/AArch64 Port
398: Deprecate the Applet API for Removal
403: Strongly Encapsulate JDK Internals
406: Pattern Matching for switch (Preview)
407: Remove RMI Activation
409: Sealed Classes
410: Remove the Experimental AOT and JIT Compiler
411: Deprecate the Security Manager for Removal
412: Foreign Function & Memory API (Incubator)
414: Vector API (Second Incubator)
415: Context-Specific Deserialization Filters
JDK 18
400: UTF-8 by Default
408: Simple Web Server
413: Code Snippets in Java API Documentation
416: Reimplement Core Reflection with Method Handles
417: Vector API (Third Incubator)
418: Internet-Address Resolution SPI
419: Foreign Function & Memory API (Second Incubator)
420: Pattern Matching for switch (Second Preview)
421: Deprecate Finalization for Removal
JDK 19
405: Record Patterns (Preview)
422: Linux/RISC-V Port
424: Foreign Function & Memory API (Preview)
425: Virtual Threads (Preview)
426: Vector API (Fourth Incubator)
427: Pattern Matching for switch (Third Preview)
428: Structured Concurrency (Incubator)
顺便安利一个历史版本下载地址:
/spec/oraclejdk.html#jdk8u261
参考链接地址:/projects/jdk
如果觉得《java-jdk各版本特性》对你有帮助,请点赞、收藏,并留下你的观点哦!