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?
About Question enthuware.ocpjp.v21.2.3312 :
Moderator: admin
-
- Posts: 8
- Joined: Sat Aug 02, 2025 11:21 pm
- Contact:
-
- Site Admin
- Posts: 10436
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.ocpjp.v21.2.3312 :
Option 1 is correct and is indeed marked as a correct option.
Who is online
Users browsing this forum: No registered users and 81 guests