Javatm Language Features
For more information see
NEW LANGUAGE FEATURES.
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 safety to the Collections Framework and eliminates the drudgery of casting. Refer to
JSR 14.
Enhanced for loop this new language construct Eliminates The DRUDGERY AND Error-Proneness of Iteratings and index variables by ity over collections and arrays. Refer to
JSR 201.
Autoboxing / Unboxing this facility Eliminates The DRUDGERY OF MANUAL Conversion Between Primitive Types (SUCH AS INT) AND WRAPPER TYPES (SUCH AS INTEGER). REFER TO
JSR 201.
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 ( "Effective Java," Item 21) without the verbosity and the error-proneness. REFER TO
JSR 201.
VARARGS THIS FACILITY ELIMINATES The NEED for Manually Boxing Up Argument Lists Into An Array When Invoking Methods That Accept Variable-Length Argument Lists Refer To
JSR 201.
STATIC Import this facility lets you avoid qualifying static membrate with class name without the shortcomings of the "constant interface antipattern." Refer to
JSR 201.
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 be key. INSTETETAIN Source File. Refer to
JSR 175.