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

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

Moderator: admin

Post Reply
Nisim123
Posts: 42
Joined: Mon Jan 20, 2014 2:26 pm
Contact:

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

Post by Nisim123 »

Hi, well, i must say this is strange, i've read lately in the jls (15.20.2) that:
At run time, the result of the instanceof operator is true if the value of the
RelationalExpression is not null and the reference could be cast (§15.16) to the
ReferenceType without raising a ClassCastException. Otherwise the result is
false.
So in this question can we cast an object of class D to be an A?

:?

Post Reply

Who is online

Users browsing this forum: No registered users and 7 guests