About Question enthuware.ocajp.i.v8.2.1168 :

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

Moderator: admin

Post Reply
MarcATC
Posts: 3
Joined: Wed Oct 10, 2018 4:57 am
Contact:

About Question enthuware.ocajp.i.v8.2.1168 :

Post by MarcATC »

small typo in the explanation of the fourth option ? It should be:
Since c1 is declared of type C1, an objectOfA of class A, cannot be assigned to c1 because A is not a C1. A C1 is an A. So A a = objectOfC1; would have been valid.

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

Re: About Question enthuware.ocajp.i.v8.2.1168 :

Post by admin »

Actually, the text in the explanation is correct but the text in the problem statement is imprecise. Problem statement should say,
Assume that objectOfA, objectOfC1, etc. are references to objects of classes A, C1, and other classes respectively.
I have also updated the explanation as follows to make it clear:
Since c1 is declared of type C1, an object of class A (which is what the reference objectOfA is pointing to, as given in the problem statement), cannot be assigned to c1 because A is not a C1. A C1 is an A. Therefore, A a = objectOfC1; would have been valid.
If you like our products and services, please help us by posting your review here.

MarcATC
Posts: 3
Joined: Wed Oct 10, 2018 4:57 am
Contact:

Re: About Question enthuware.ocajp.i.v8.2.1168 :

Post by MarcATC »

You're absolutely right...the devil is in the details :)

Post Reply

Who is online

Users browsing this forum: No registered users and 55 guests