摘要: 援引 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 阅读(195) 评论(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 阅读(135) 评论(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 阅读(255) 评论(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 阅读(132) 评论(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 阅读(319) 评论(0) 推荐(0) 编辑