J2SE Version 6.0
Code
named Mustang and released on December 11,
2006.
- Scripting Language Support : Generic API for tight integration with scripting languages, and built-in Mozilla JavaScript Rhino integration . Scripting allows Java applications to invoke script engines dynamically through a "service discovery" mechanism. This allows developers to add scripts from Groovy, Python and Ruby in their applications. Now developers are having power to instantiate classes directly from a script. So the repetitive tasks can be automated and making the developers life easier.
- JDBC 4.0 support: - All JDBC drivers loading and registration is now handled by a new DriverManager class. Now no need to use "Class.forName()" function to manually register a driver. Now For SQL query strings, annotations can be used. Support for New data types (including XML and SQL ROWID).
- Java Compiler API: Now Using API, programmatically developers can select and invoke a Java Compiler by a Java program.Java SE 6 allows the compiler to receive input and/or send output to an abstraction of the file system
- JVM improvements include: synchronization and compiler performance optimizations, new algorithms and upgrades to existing garbage collection algorithms, and application start-up performance.
- Upgrade of JAXB(Java Architecture for XML Binding) to version 2.0 : Including integration of a StAX(Streaming API for XML) parser.
- XML digital signature API
- JDK6 includes support for pluggable annotations. Included Support Web services metadata for the Java Platform and Common Annotations for the Java Platform.
- Integrated support for Web Services through JAX-WS
- Performance improvements tweaks are added for the core platform and Swing.
- GUI improvements, Like as integration of SwingWorker in the API, table sorting and filtering, and true Swing double-buffering. Included a feature of writing of GIF images and Improved drag-and-drop support.
Enhancements to the collections
framework in Java SE 6 is as follows:-
The following new interfaces are included in the Collection framework.
- Deque - a double ended queue, supporting element insertion and removal at both ends. Extends the Queue interface.
- BlockingDeque - a Deque with operations that wait for the deque to become non-empty when retrieving an element, and wait for space to become available in the deque when storing an element. Extends both the Deque and BlockingQueue interfaces. (This interface is part of java.util.concurrent.)
- NavigableSet - a SortedSet extended with navigation methods reporting closest matches for given search targets. A NavigableSet may be accessed and traversed in either ascending or descending order. This interface is intended to supersede the SortedSet interface.
- NavigableMap - a SortedMap extended with navigation methods returning the closest matches for given search targets. A NavigableMap may be accessed and traversed in either ascending or descending key order. This interface is intended to supersede the SortedMap interface.
- ConcurrentNavigableMap - a ConcurrentMap that is also a NavigableMap. (This interface is part of java.util.concurrent.)
The following new concrete implementation classes have been included in Collection framework.
- ArrayDeque - efficient resizable-array implementation of the Deque interface.
- ConcurrentSkipListSet - concurrent scalable skip list implementation of the NavigableSet interface.
- ConcurrentSkipListMap - concurrent scalable skip list implementation of the ConcurrentNavigableMap interface.
- LinkedBlockingDeque - concurrent scalable optionally bounded FIFO blocking deque backed by linked nodes.
- AbstractMap.SimpleEntry - simple mutable implementation of Map.Entry
- AbstractMap.SimpleImmutableEntry - simple immutable implementation of Map.Entry
For above interface and implementation example check :- http://javatechtipssharedbygaurav.blogspot.in/2013/03/jdk6-collection-new-features-arraydeque.html
Two new methods were added to the Collections
utility class:
- newSetFromMap(Map) - creates a general purpose Set implementation from a general purpose Map implementation.
- asLifoQueue(Deque) - returns a view of a Deque as a Last-in-first-out (Lifo) Queue.
The Arrays utility class now has methods copyOf
and copyOfRange
that can efficiently resize, truncate, or copy subarrays for arrays of all
types.
Ref taken from :- wikipedia and oracle
Note:- Java 6 improves the programming environment, especially for JDBC and AWT/Swing programs
No comments:
Post a Comment