Given the class definitions:
class C1 {}
class C2 extends C1 {}
class C3 extends C2 {}
and the code fragment:
16. C1 obj1 = (C1) new C2();
17. C2 obj2 = (C2) new C3();
18. C2 obj3 = (C2) new C1();
19. C3 obj4 = (C3) obj2;
Which line throws ClassCastException?
Sudhakar_Senthilkumar
1 week, 6 days agoMPignaProTech
2 months, 2 weeks agoUAK94
2 years, 3 months agoiSnover
2 years, 3 months agoshivkumarx
2 years, 4 months ago