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 [...]".
About Question enthuware.ocajp.i.v7.2.1113 :
Moderators: Site Manager, fjwalraven
-
- Posts: 3
- Joined: Mon Nov 25, 2013 3:31 pm
- Contact:
-
- Site Admin
- Posts: 10385
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.ocajp.i.v7.2.1113 :
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.
thank you for your feedback!
Paul.
-
- Posts: 3
- Joined: Mon Nov 25, 2013 3:31 pm
- Contact:
Re: About Question enthuware.ocajp.i.v7.2.1113 :
True, my mistake 

Who is online
Users browsing this forum: No registered users and 7 guests