J2SE 5.0: Codename Tiger
J2SE 5.0 was released on 30th September 2004. Developed under JSR 176, Tiger added a number of significant language features, including the for-each loop, generics, autoboxing, and var-args. This release had:
· 3,562 classes
· 166 packages
New Features are as follows:
· Generics allow a type or method to operate on objects of various types while providing compile-time type safety. This was added to all the classes in the Collections Framework.
· The enhanced for loop eliminates the drudgery and error proneness of iterators and index variables when iterating over collections and arrays.
· The auto-boxing/unboxing feature eliminates the drudgery of manual conversion between primitive types and wrapper types.
· The var-args allow us to specify a variable number of arguments on program invocation.
· Besides these, typesafe enums were introduced in this version.
· The newly added static import facility lets us avoid qualifying static members with class names without the shortcomings of the “Constant Interface anti-pattern.”
Additionally, changes and enhancements were made to Internationalization APIs. Internationalization is the process of designing an application so that it can be adapted to various languages and regions without engineering changes. Sometimes the term internationalization is abbreviated “i18n,” because there are 18 letters between the first letter (i) and the last (n).
Besides these, the following APIs were enhanced: JavaSound and Java 2D technologies, Image I/O, AWT, and Swing. The java.lang and java.util packages had several enhancements, including the new Formatter and Scanner classes. There were lots of enhancements to Concurrency Utilities and the Collections Framework.
On the hardware front, AMD Opteron processors are now supported by the server VM on SUSE Linux and on Windows 2003.
Java SE 6: Codename Mustang
This release introduced several changes and additions to the Collections Framework. New interfaces, named Deque, BlockingDeque, NavigableSet, NavigableMap, and ConcurrentNavigableMap, were added.A concrete implementation classes were added, and the existing classes were retrofitted to implement new interfaces.
Several enhancements were made in the java.lang.instrument package. The Instrumentation API provides services that allow Java programming language agents to instrument programs running on the JVM.
The java.io package introduced a new class called Console. This class contains methods to access a character-based console device; its readPassword method allows input of sensitive data such as passwords by disabling echoing of characters on the console.
The File class now has several methods to retrieve disk usage information as well as setting and querying file permissions.
The JAR and ZIP API was also enhanced. In addition, enhancements were made in Java Web Start and the Java Network Launching Protocol (JNLP), which provides a browser-independent architecture for deploying Java 2 technology-based applications to the client desktop.
Other major changes included support for pluggable annotations (JSR 269), lots of GUI improvements, including native UI enhancements to support the look and feel of Windows Vista, and improvements to the JPDA and JVM Tool Interface for better monitoring and troubleshooting.