Page 1 of 1

About Question enthuware.ocajp.i.v7.2.1403 :

Posted: Thu Sep 04, 2014 2:21 am
by roywase
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...?

Re: About Question enthuware.ocajp.i.v7.2.1403 :

Posted: Thu Sep 04, 2014 4:54 am
by admin
You are right. There should be an argument in move and moveBack methods in Movable interface.

Fixed.
thank you for your feedback!
Paul.