Java Development Kit (JDK) 7 is most recent release of Java Standard Platform. I takes the birth at the OpenJDK project and has taken collaborative effort of Sun and Java developer community.
JVM
- Extensions to the JVM to support the implementation of dynamically-typed languages (InvokeDynamic) at performance levels near to that of the Java language itself.
Programming Language
- The integral types (
byte
,short
,int
, andlong
) can also be expressed using the binary number system. To specify a binary literal, add the prefix0b
or0B
to the number. - The
String
class can be used in the expression of aswitch
statement. - A single
catch
block can handle more than one type of exception. In addition, the compiler performs more precise analysis of rethrown exceptions than earlier releases of Java SE. - The
try
-with-resources statement ensures that each resource is closed at the end of the statement. Any object that implements the newjava.lang.AutoCloseable
interface or thejava.io.Closeable
interface can be used as a resource. - The type arguments required to invoke the constructor of a generic class can be replaced with an empty set of type parameters (
<>
) as long as the compiler can infer the type arguments from the context. - The Java SE 7 complier generates a warning at the declaration site of a varargs method or constructor with a non-reifiable varargs formal parameter.
Networking
- The URLClassLoader.close() method effectively eliminates the problem of how to support updated implementations of the classes and resources loaded from a particular codebase, and in particular from JAR files.
- Sockets Direct Protocol support for reliable, high-performance network streams over Infiniband connections on Solaris and Linux.
Concurrency Utilities
- The fork/join framework is designed to efficiently run a large number of tasks using a pool of worker threads.
- The ThreadLocalRandom class eliminates contention among threads using pseudo-random numbers.
- The Phaser class is a new synchronization barrier.
I/O
- New APIs for filesystem access, scalable asynchronous I/O operations, socket-channel binding and configuration, and multicast datagrams.
- A fully-functional and supported NIO.2 filesystem provider for zip and jar files.
JDBC
- The ability to use a
try
-with-resources statement to automatically close resources of typeConnection
,ResultSet
, andStatement.
- RowSet 1.1: The introduction of the
RowSetFactory
interface and theRowSetProvider
class, which enable you to create all types of row sets supported by your JDBC driver.