Performance Enhancements:
JavaTM Language Features
No1. Generic(泛型) (关键字: compile-time,type-safe, drudegery ,casting)
This long-awaited enhancement to the type system allows a type or method to operate on objects of various types while providing compile-time type safety. It adds compile-time type safety to the Collections Framework and eliminates the drudgery of casting.
No2.Enhance for Loop(循环)
This new language construct eliminates the drudgery and error-proneness of iterators and index variables when iterating over collections and arrays.
No3.AutoBoxing/Unboxing(自动装包/拆包)
This facility eliminates the drudgery of manual conversion between primitive types (such as int) and wrapper types (such as Integer).
No4. TypeSafe Enums (枚举)
This flexible object-oriented enumerated type facility allows you to create enumerated types with arbitrary methods and fields. It provides all the benefits of the Typesafe Enum pattern without the verbosity and the error-proneness.
No5. Varargs(可变参数)
This facility eliminates the need for manually boxing up argument lists into an array when invoking methods that accept variable-length argument lists
No6.Static Import(静态导入)
This facility lets you avoid qualifying static members with class names without the shortcomings of the "Constant Interface antipattern."
No7. Metadata (Annotations)
This language feature lets you avoid writing boilerplate code under many circumstances by enabling tools to generate it from annotations in the source code. This leads to a "declarative" programming style where the programmer says what should be done and tools emit the code to do it. Also it eliminates the need for maintaining "side files" that must be kept up to date with changes in source files. Instead the information can be maintained in the source file
分享到:
相关推荐
JDK1.5-1.6-1.7之新特性总结
开发过程中接触到了从jdk1.5---jdk1.7的使用,在不同的阶段,都使用过了jdk的一些新特性,操作起来更加方面啦!特此总结了下,与喜欢it 的朋友共勉!
转载 jdk1.5的一些新特性,希望能帮助大家!
JDK1.5新特性
Enum是Sun全新引进的一个关键字,看起来很象是特殊的class,它也可以有自己的变量,可以定义自己的方法,可以实现一个或者多个接口。在声明一个enum类型时,应该注意到enum类型有如下的一些特征:
JDK1.5新特性泛型_深入研究JDK1.5新特性泛型_深入研究JDK1.5新特性泛型_深入研究
“JDK1.5”(开发代号猛虎)的一个重要主题就是通过新增一些特性来简化开发,这些特性包括泛型,for-else 循环,自动装包/拆包,枚举,可变参数, 静态导入
Jdk1.5、1.6、1.7之间的新特性,很详细。好东西,值得下载
JDK 1.5新特性及应用JDK 1.5新特性及应用JDK 1.5新特性及应用
jdk1.5新特性 泛类型和泛型方法是Java5.0 中的新特性。一种泛类型用一个或多个泛型变量定义,可以有一个或多个,泛型变量做参数占位符或做返回值 的方法。
博文链接:https://weibaojun.iteye.com/blog/70284
jdk 1.5新特性笔记,泛型,注释等程序
关于jdk1.5新特性的书,值得拥有,不错的资料
jdk1.5 tiger java5 新特性
jdk1.5新特性,泛型,for:each
JDK1.5JDK1.6各自的新特性
1.增强的for循环【foreach{}迭代数组或集合】 格式:for(变量的类型 变量名:集合变量名 ){} 注意:集合变量可以是数组或实现了Iterable接口的集合类 2.静态导入(这样调用一个静态方法的时候就不需要【类名....
jdk1.5新特性[归纳].pdf