Why? As final class cannot be subclassed. So It will never be possible to do
C c=new D();
So it is not possible to make subclass of C means now no possibility to make a reference of C will point to an object that implements inter interface. Compiler can detect these things. So it will not allow final class reference to be checked as instanceof any interface that final class is not implementing. [ December 16, 2008: Message edited by: punit.singh ]
SCJP 6
Ruben Soto
Ranch Hand
Joined: Dec 16, 2008
Posts: 1032
posted
0
Perfect answer, Punit. I am removing my erroneous answer. [ December 16, 2008: Message edited by: Ruben Soto ]
All code in my posts, unless a source is explicitly mentioned, is my own.