About Question enthuware.ocpjp.v11.2.1302 :

Post Reply
Monteragi
Posts: 4
Joined: Sun Apr 25, 2021 1:03 pm
Contact:

About Question enthuware.ocpjp.v11.2.1302 :

Post 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.

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

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

Post by admin »

viewtopic.php?f=2&t=315

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

Post Reply

Who is online

Users browsing this forum: No registered users and 66 guests