About Question enthuware.ocpjp.v7.2.1316 :

Help and support on OCA OCP Java Programmer Certification Questions
1Z0-808, 1Z0-809, 1Z0-815, 1Z0-816, 1Z0-817

Moderator: admin

Post Reply
bluster
Posts: 60
Joined: Wed Apr 23, 2014 6:38 pm
Contact:

About Question enthuware.ocpjp.v7.2.1316 :

Post by bluster »

I just did two tests back to back and I apologize if this is exhaustion-induced stupidity.

If we had objects instead of primitives in the method returns, say Integer and Long on the return types, would the last answer be a correct overriding of the method with a covariant return type Short replacing Long ?

Thanks!

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

Re: About Question enthuware.ocpjp.v7.2.1316 :

Post by admin »

No, because Long doesn't extend Short.

bluster
Posts: 60
Joined: Wed Apr 23, 2014 6:38 pm
Contact:

Re: About Question enthuware.ocpjp.v7.2.1316 :

Post by bluster »

Thanks. Now when rested I see how far off I was!

Post Reply

Who is online

Users browsing this forum: No registered users and 10 guests