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.
If you see the snippet of code above, it will give un-convertible types. Look at this snippet
The error must be first coming when you will be assigning c to to ref variable. You can't do that, because C extends B and
in turn B doesn't extends A, so they are inconvertible types. So you cannot assign c to A.
Well, what do you mean by it runs fine and doesn't give any error. Are you talking about this statement
Even at this line, it's going to give you an error of in convertible types.