There's nothing in the Java language that was removed between JDK5 and 6. The only thing which was added, as has been said, was the @Override
annotation being allowable on interface methods - no keywords. Hence you are left with library diferences as the only cause of breaking changes, I'm afraid.
These do exist, even in the core API; in an unusual fit of backwards-compatibility-breaking revelry they changed the signature of some methods on the ExecutorService
interface. This was because the generic signatures of the methods were overly restrictive. This was a pure library change (although, being part of java.util
, a pretty core library); nothing to do with any language-level modification.
For example, from JDK5 :
<T> T invokeAny(Collection<Callable<T>> tasks)
to JDK6:
<T> T invokeAny(Collection<? extends Callable<T>> tasks)
This means that any program which contained code implementing this interface in JDK5, would not have compiled against JDK6. A snippet is easy to create; just let your IDE create an empty implementation of the JDK5 interface and then build against JDK6.
Note: that the wildcard was added because the previous version would not have accepted a parameter like List<MyCallable<String>>
(i.e. the collection being typed by some subclass of callable) whereas the later version does.