Java 7 Features

Try with resources - this allows File IO and Database connections to work without having to specifically close the resource.

Switch statement works with Strings.

java.util.Objects - this class provides static utility methods for operating on objects. A main function of this is to provide null safety. Example:

// will throw a customized NullPointerException instead of the old generic one
public Foo(Bar bar, Baz baz) {
this.bar = Objects.requireNonNull(bar, "bar must not be null");
this.baz = Objects.requireNonNull(baz, "baz must not be null");
}

This provides the ability to test two objects without having to first make sure they aren't null
Objects.equals(this.lastName, other.lastName)

Objects.toString(obj) will return "null" if the object is null.

File system support:

JDBC enhancements:

Enhanced comparisons:

Calendar:

Swing & AWT several changes and a new sound synthesizer.

JMX enhancements, concurrency enhancements, locale enhancements.

and many more!