Previous versions

1.3 is plain old Java

1.4 'assert' keyword

5 'enum' keyword, generics, autoboxing, etc.

6 @Override in interfaces

7 Diamonds, ARM, multi-catch, etc.

Java 8

Lambdas, type annotations, etc.

// instead of writing an anonymous inner class (e.g. for Runnable) like this
Runnable runnable = new Runnable(){
       @Override
       public void run(){
         System.out.println("Hello world !");
       }
     };

// you now can write a lambda for it
Runnable runnable = () -> System.out.println("Hello world two!");

Collections & Streams

functional-style operations for collections, also known as the Stream API

List<String> list = Arrays.asList("franz", "ferdinand", "fiel", "vom", "pferd");
list.stream()
    .filter(name -> name.startsWith("f"))
    .map(String::toUpperCase)
    .sorted()
    .forEach(System.out::println);

more features

A complete list is available here:

What's New in JDK 8

Java 9 - Modules, private methods in interfaces, etc.

Project Jigsaw: Java Modules and Multi-Release Jar Files

Interfaces got private methods