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

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
pawmot
Posts: 3
Joined: Mon Nov 25, 2013 3:31 pm
Contact:

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

Post by pawmot »

Question: "Which of the following is a legal return type of a method overriding the given method: public Object  myMethod() {...} (Select the best option.)"

Answer listed as correct: "Return type can be any object since all objects can be cast to Object."

"Any object" is not a type. The answer should state "[...] can be any type [...]".

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

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

Post by admin »

Well, it can't be any type because you can't have primitive. But I agree it should be "class" instead of object.

thank you for your feedback!
Paul.

pawmot
Posts: 3
Joined: Mon Nov 25, 2013 3:31 pm
Contact:

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

Post by pawmot »

True, my mistake :)

Post Reply

Who is online

Users browsing this forum: No registered users and 12 guests