Kamis, 18 September 2008

The Second Java Revolution

Java 2 Platform Standard Edition, version 5 (J2SE 5) marks the beginning of the second Java revolution. J2SE 5 adds many new features to Java that fundamentally change the character of the language, increasing both its power and its range. So profound are these additions that they will forever alter the way that Java code is written. J2SE 5 is a revolutionary force that cannot be ignored.
To give you an idea of the scope of the changes caused by J2SE 5, here is a list of its major new features covered in this book:
● Generics
● Autoboxing/unboxing
● Enumerations
● The enhanced, “for-each” style for loop
● Variable-length arguments (varargs)
● Static import
● Metadata (annotations)

This is not a list of minor tweaks or incremental upgrades. Each item in the list represents a significant addition to the Java language. Some, such as generics, the enhanced for, and varargs, introduce new syntax elements. Others, such as autoboxing and auto-unboxing, alter the semantics of the language. Metadata adds an entirely new dimension to programming. In all cases, substantial functionality has been added. 
The importance of these new features is reflected in the use of the version number 5. The next version number for Java would normally have been 1.5. However, the changes and new features are so significant that a shift from 1.4 to 1.5 just didn’t seem to express the magnitude of the change. Instead, Sun elected to increase the version number to 5 as a way of emphasizing that a major event was taking place. Thus, the current product is called J2SE 5, and the developer’s kit is called JDK 5. However, in order to maintain consistency, Sun decided to use 1.5 as its internal version number. Thus, 5 is the external version number and 1.5 is the internal version number.

Because of Sun’s use of 1.5 as the internal version number, when you ask the compiler its version, it will respond with 1.5 rather than 5. Also, the online documentation supplied by Sun uses 1.5 to refer to features added by the J2SE 5. In general, whenever you see 1.5, it simply means 5.

Tidak ada komentar: