Page 1 of 1

About Question enthuware.ocpjp.v11.2.1302 :

Posted: Sat May 01, 2021 10:35 am
by Monteragi
Replace line //4 and //5 with: Integer i = map.get(b); return i == null? 0:i;
This change is fine if coupled with option 2 but it is not required.
Task states: Choose minimal changes that are necessary to take advantage of generics.

Automatic casting is one of the advantages of generics. So I selected the option with removal of manual casting.
I consider it's right option as there is no information that answers should be independent from each other.

Re: About Question enthuware.ocpjp.v11.2.1302 :

Posted: Sun May 02, 2021 2:09 am
by admin
viewtopic.php?f=2&t=315

Kindly post your queries about OCP Java 11 certification questions in the right forum.