About Question enthuware.ocajp.i.v7.2.1403 :
Posted: Thu Sep 04, 2014 2:21 am
The answer provided does not seem to be correct. The Movable interface method moveBack() doesn't accept a parameter, so it is not implemented correctly in the class Donkey. Therefore it won't compile. Also in the testclass the method 'moveBack' is invoked with an int argument on an object that has the Movable as reference type. This is again not allowed and won't compile.
The correct answer should imho be that both TestClass and donkey won't Compile.
Or am I missing something...?
The correct answer should imho be that both TestClass and donkey won't Compile.
Or am I missing something...?