Hi Folks.
In the Whizzlabs tests for objective 5, there is the following question:
https://dl.dropboxusercontent.com/u/38167918/Computing/OCPJP/WhizLabs/Objective5/DownCasting1.JPG
The correct answer is that a ClassCastException is thrown at runtime. It is mentioned that line 3 causes this to happen. However line 3 looks like a downcast to me, so I don't understand why it would cause that exception.
It is also mentioned that line 4 would not give a problem because the interface type is being cast to the Base type, which also seems like a downcast to me, and this is fine and not causing any exception!! Hope someone can explain. Thank you.
regards
John.