Page 1 of 1

About Question enthuware.ocpjp.v21.2.3312 :

Posted: Sun Sep 21, 2025 2:23 pm
by nnavlani
List<? super Dooby> dV implies that dV must point to a List of some super class of Dooby. It could be a List of Dooby, Booby, or Object. which means instead of a List, a single object of type Dooby, Booby, or an Object can be added too. And so if we give one answer as
dV.add(new Dooby(){ }); (choice a),
then why is that incorrect?

Re: About Question enthuware.ocpjp.v21.2.3312 :

Posted: Sun Sep 21, 2025 10:57 pm
by admin
Option 1 is correct and is indeed marked as a correct option.