Hi,
this concept i took from devaka's
examlab.
why can't final class be applied to instanceof
test with the interface which it does not implement?
for eg:
class A{}
class B extends A implements inter{}
final class C{}
class Testex
{
public static void main(
String args[])
{
boolean b=new A() instanceof inter;
boolean b1=new B() instanceof inter;
boolean b2=new C() instanceof inter; // compiler error ie. inconvertible type
System.out.println(b+ "," +b1+ "," + b2);
}
}
could someone explain this?
Thanks
Preetha