Page 1 of 1

About Question enthuware.ocpjp.v17.2.3720 :

Posted: Mon Oct 21, 2024 1:01 am
by dalvir
Hi

For the option c, I believe the following description should be changed:
---------------------------------------------
"Without pattern matching, you would have to do explicit cast like this:
if(a instanceof B b1){   
( (B) b1 ).b();
}
-----------------------------------------------------
I believe above code can be changed to:

if(a instanceof B){   
( (B) a ).b();
}

Please provide your guidance on it.

Thanks

Re: About Question enthuware.ocpjp.v17.2.3720 :

Posted: Tue Oct 22, 2024 5:52 am
by admin
Yes, you are right. That should be fixed.
thank you for your feedback!