随笔分类 -  JDK1.5新特性

JDK1.5新特性的部分总结
摘要:概述 Annotations (Metadata) - 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 ... 阅读全文
posted @ 2013-12-08 18:29 ShawnWithSmallEyes 阅读(353) 评论(0) 推荐(0)
摘要:概述 Generics - 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 safet... 阅读全文
posted @ 2013-12-07 01:43 ShawnWithSmallEyes 阅读(330) 评论(0) 推荐(0)
摘要:援引 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 p... 阅读全文
posted @ 2013-12-02 14:54 ShawnWithSmallEyes 阅读(210) 评论(0) 推荐(0)
摘要:援引 Autoboxing/Unboxing - This facility eliminates the drudgery of manual conversion between primitive types (such as int) and wrapper types (such as Integer). 用法 基本数据类型的自动拆箱和自动装箱 autoboxing & unbo... 阅读全文
posted @ 2013-12-02 14:50 ShawnWithSmallEyes 阅读(145) 评论(0) 推荐(0)
摘要:援引 Varargs - This facility eliminates the need for manually boxing up argument lists into an array when invoking methods that accept variable-length argument lists. 用法 个数可变的参数 public void foo(int ... 阅读全文
posted @ 2013-12-02 14:44 ShawnWithSmallEyes 阅读(272) 评论(0) 推荐(0)
摘要:援引 Static Import - This facility lets you avoid qualifying static members with class names without the shortcomings of the "Constant Interface antipattern. 用法 import static java.util.Arrays.*; 导入的... 阅读全文
posted @ 2013-12-02 14:40 ShawnWithSmallEyes 阅读(142) 评论(0) 推荐(0)
摘要:援引 Enhanced for Loop - This new language construct eliminates the drudgery and error-proneness of iterators and index variables when iterating over collections and arrays. 用法 增强for循环代替了一些原来的for... 阅读全文
posted @ 2013-12-02 14:34 ShawnWithSmallEyes 阅读(340) 评论(0) 推荐(0)