what would be the output?

Posted by Abhishek Jain on Stack Overflow See other posts from Stack Overflow or by Abhishek Jain
Published on 2010-06-13T16:20:07Z Indexed on 2010/06/13 16:22 UTC
Read the original article Hit count: 182

Filed under:
|

Please explain me below situation What would be the output? interface A{} class B implements A{} class C extends B{} Class D extends C{} class E extends D{ public static void main(String args[]){ C c = new C(); B b = c; A a = (E)c; A a = (B)c; C c = (C)(B)c; } }

© Stack Overflow or respective owner

Related posts about java

Related posts about inheritance