简体   繁体   English

哪个Java版本引入了哪些语言功能?

[英]Which Java versions introduced which language features?

Is there any comprehensive resource on the versions that the different language features were introduced in for Java? 是否有针对Java引入不同语言功能的版本的任何综合资源? For example where I can type or search for 'static initialization blocks', and it can tell me that this feature is available in Java since version xx. 例如,我可以键入或搜索“静态初始化块”,它可以告诉我,自xx版本以来,这个功能在Java中可用。

Below highlights a (non-comprehensive) list of changes between Java versions. 下面重点介绍Java版本之间的(非全面的)更改列表。 Please add major changes to the language and platform. 请添加语言和平台的主要更改。

Java 1.0 Press Release Java 1.0新闻稿

  • Introductory version. 介绍版。

Java 1.1 Press Release Java 1.1新闻稿

  • Nested classes 嵌套类
  • Object serialization 对象序列化
  • JavaBeans API JavaBeans API
  • JDBC JDBC
  • Serialization & RMI 序列化和RMI
  • Unicode 2.0 support Unicode 2.0支持

Java 1.2 Press Release Java 1.2新闻稿

  • strictfp
  • Java Security Model Java安全模型
  • JIT Compilation JIT编译
  • Swing 摇摆
  • Collections Framework 馆藏框架

Java 1.3 Press Release Java 1.3新闻稿

  • HotSpot VM HotSpot VM
  • JNDI JNDI

Java 1.4 Press Release Java 1.4新闻稿

  • assert statement 断言
  • java.util.logging java.util.logging中

Java 5 Press Release Java 5新闻稿

  • Primitive autoboxing 原始自动装箱
  • Generic types 通用类型
  • enum 枚举
  • Annotations 注释
  • Enhanced for loop 增强了循环
  • Static imports 静态导入
  • Formatted input and output 格式化输入和输出
  • varargs 可变参数

Java 6 Features and Enhancements Java 6的功能和增强功能

  • New collection interfaces 新的集合接口

JDK 7 Features JDK 7功能

  • try-with-resources 尝试与 - 资源
  • Multiple exception-type catch 多个异常类型的catch
  • diamond "operator" 钻石“操作员”
  • switch on strings 打开字符串
  • Binary literals 二进制文字
  • Underscores in integral literals 强调整数文字
  • Fork-Join Framework Fork-Join框架

JDK 8 Features JDK 8功能

  • Lambda expressions Lambda表达式
  • default & static methods on interfaces 接口上的默认和静态方法
  • Stream API 流API
  • java.time API java.time API
  • Nashorn JavaScript engine Nashorn JavaScript引擎

Also, to have a more detailed analysis of Java language changes with each version, one can go through Java_Version_History Wikipedia 此外,要对每个版本进行更详细的Java语言更改分析,可以通过Java_Version_History Wikipedia进行更新

This Link will summerize the main features added to specific version with each version name and it's relase date. 链接汇总添加到特定版本的主要功能与每个版本名称及其相关日期。 Hope this helps you. 希望这对你有所帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 JavaFX 中是否有特性或功能将受益于后续 Java 版本的语言/VM 改进? - Are there features or functionality in JavaFX which will benefit by the language/VM improvements of later Java versions? 在C#中没有等价的Java语言功能 - Java language features which have no equivalent in C# 哪些版本应该用于使用 java 语言的 Spark cassandra 连接? - Which versions should be used for Spark cassandra connection using java Language? 在哪个版本的Java中引入了匿名类? - In which version of Java were anonymous classes introduced? 在Java 5中引入的Enum类的目的是什么? - What is the purpose of Enum class which was introduced in Java 5? 哪个 Android 版本运行哪个 Java 版本? - Which Android versions run which Java versions? 哪些版本的Eclipse与哪些版本的Java兼容? - Which versions of Eclipse is compatible with which versions of java? 哪些 Kotlin 版本与哪些 Java 版本兼容? - Which versions of Kotlin are compatible with which versions of Java? 是否可以通过编程方式确定当前平台上可用的Java语言功能? - Any way to programmatically determine which Java language features are available on current platform? 哪个版本的Android SDK支持在哪个Java版本中进行编码? - Which versions of Android SDK support coding in which versions of Java?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM