This week's book giveaway is in the OCMJEA forum. We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara 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.