This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
hi everyone. i am doing prepation for jcp a INTERFACE bINTERFACE | | CLASS B IMPLEMENTS A HERE NO RELATION BETWEEN A INTER AND B INTER IF IN A PROGRAM WE WRITE b obj1; B obj=(B)obj1; in this case there is no cmpile time error why
Hi, You get no compile error because you are using casting. When you perform casting you are telling the compiler that you know what you are doing and to stop checking if I am right! You will still get a run time error if the Object can't be cast to the interface! Regards, Manfred.