You can simply have any class implement any interface and in the implementation method throw new UnsupportedOperationException. You will find several such examples in standard JDK classes. Just google throw new UnsupportedOperationException in jdk source code.
Hi,
As it happens I was reading the Oracle Collections trail last night and retook a test with this question on just now, so I remembered that Oracle wrote something about this regarding the implementations, so just in case it comes up on the exam:
To keep the number of core collection interfaces manageable, the Java platform doesn't provide separate interfaces for each variant of each collection type. (Such variants might include immutable, fixed-size, and append-only.) Instead, the modification operations in each interface are designated optional — a given implementation may elect not to support all operations. If an unsupported operation is invoked, a collection throws an UnsupportedOperationException. Implementations are responsible for documenting which of the optional operations they support. All of the Java platform's general-purpose implementations support all of the optional operations.