Page 1 of 1

About Question enthuware.ocpjp.v8.2.1302 :

Posted: Sun Mar 20, 2016 9:00 am
by digitalillusion
Hello,

I don't agree with the fact that the option

Replace line //4 and //5 with:
Integer i = map.get(b);
return i == null? 0:i;

is "not required" and I selected it instead of option

There is no need to change //4 and //5.

Infact, the question states "Choose changes that are absolutely necessary to take advantage of generics" and while my choice was not necessary for compilation, the page https://docs.oracle.com/javase/tutorial ... s/why.html reports that one of the advantages of generics is indeed Elimination of casts.

The question is infact ambiguos since absolute necessity may imply getting the most advantage, and I think it should be rewritten to "Choose the minimal changes necessary to take advantage of generics"
Or else the answer I gave should be accepted :)

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

Posted: Sun Mar 20, 2016 9:29 pm
by admin
Changed.
thank you for your feedback!
Paul.

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

Posted: Mon Mar 21, 2016 7:50 am
by digitalillusion
In any case, your exam simulation teaches to think.
I passed the real exam today, and I would like to sincerely thank you.

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

Posted: Mon Mar 21, 2016 10:23 am
by admin
Great! Congratulations!!
Glad to know that our simulator was helpful in your preparation :)