Features of JDK 5,JDK 6 and JDK 7:
JDK 5:
Codename:Tiger
·
Introduced Generics ( Provides
compile-time (static) type safety for collections and eliminates
the need for most typecasts (type conversion)).
·
Metadata: Also called annotations; allows language constructs such as classes and
methods to be tagged with additional data, which can then be processed by
metadata-aware utilities.
·
Autoboxing/unboxing: Automatic conversions between primitive types (such as
int)
and primitive wrapper classes
(such as Integer).
·
Enumerations: The
enum
keyword creates a typesafe, ordered list of values (such as Day.MONDAY,
Day.TUESDAY, etc.). Previously
this could only be achieved by non-typesafe constant integers or manually
constructed classes (typesafe enum pattern)
·
Varargs: The last parameter of a method can now be declared
using a type name followed by three dots (e.g.
void
drawtext(String... lines)). In the calling code any number of
parameters of that type can be used and they are then placed in an array to be
passed to the method, or alternatively the calling code can pass an array of
that type.
·
Enhanced for each loop: The
for
loop syntax is extended with special syntax for iterating over each member of
either an array or any Iterable, such as the standard Collection classes.
·
Fix the previously broken semantics of the Java
Memory Model, which defines how threads interact
through memory.
·
Static imports (that allows members (fields and methods)
defined in a class as public static to
be used in Java code without specifying the class in which the field is defined)
·
Automatic stub generation for RMI objects.
·
Swing: New skinnable look and feel, called synth.
·
The concurrency utilities in package java.util.concurrent.
·
Scanner class
for parsing data from various input streams and buffers.
JDK 6: Codename:Mustang
·
Generic API
for tight integration with scripting languages, and built-in Mozilla JavaScript
Rhino integration
·
Dramatic
performance improvements for the core platform,and Swing.
Many GUI improvements, such as integration of SwingWorker
in the API, table sorting and filtering, and true Swing
double-buffering (eliminating the gray-area effect).
·
Improved Web
Service support through JAX-WS
·
JDBC 4.0 support
·
Java Compiler
API ::an API allowing a Java program to select and invoke a Java Compiler
programmatically.
·
Upgrade of JAXB to version 2.0
·
Support for
pluggable annotations
·
JVM improvements include: synchronization and compiler
performance optimizations, new algorithms and upgrades to existing garbage collection algorithms, and
application start-up performance
JDK 7: Codename:Dolphin
·
JVM support for dynamic languages, following the prototyping
work currently done on the Multi Language
Virtual Machine
·
Small
language changes (grouped under a project named Coin)
·
Strings in switch
·
Automatic resource management in try-statement
·
Improved type inference for generic instance creation
·
Simplified varargs method declaration
·
Binary integer literals
·
Allowing underscores in numeric literals
·
Catching multiple exception types and rethrowing
exceptions with improved type checking
·
New file I/O library to enhance platform
independence and add support for metadata and symbolic links. The new packages
are java.nio.file and java.nio.file.attribute.
·
Library-level
support for elliptic curve cryptography algorithms
·
An XRender
pipeline for Java 2D, which improves handling of features specific to modern GPUs
·
New platform
APIs for the graphics features originally implemented in version 6u10 as
unsupported APIs
·
Enhanced
library-level support for new network protocols, including SCTP and Sockets Direct Protocol
·
Upstream updates to XML and Unicode
No comments:
Post a Comment