About Question enthuware.ocpjp.v11.2.1302 :

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

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.

Site Admin
Posts: 10102
Joined: Fri Sep 10, 2010 9:26 pm

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

Post by admin »


Kindly post your queries about OCP Java 11 certification questions in the right forum.
If you like our products and services, please help us by posting your review here.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest