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

All the posts and topics that contain only an error report will be moved here after the error is corrected. This is to ensure that when users view a question in ETS Viewer, the "Discuss" button will not indicate the presence of a discussion that adds no value to the question.

Moderators: Site Manager, fjwalraven

Post Reply
roywase
Posts: 2
Joined: Thu Sep 04, 2014 2:09 am
Contact:

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

Post 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...?

admin
Site Admin
Posts: 10389
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

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

Post 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.

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests