Hi,
Collection is an interface, not a class.
Interfaces are different from classes - they are not in the class inheritance tree, there are 'oudside' of this tree.
Where an interface is on the right side of instanceof operator, the operator tests if given object implements that interface.
Virtually all classes can implement any interface, and compiler cannot reject this
test at compile time.
Look at this example:
Here we have:
1. interface Collectionnn
2. two clasess: HashMappp, HashMappp_Collection in one 'inheritance subtree'
3. third class: OtherClass that is in the other 'inheritance subtree' than classes from point 2.
HashMappp doesn't implement Collectionnn, but two other classes do.