About Question enthuware.ocpjp.v21.2.3312 :

Help and support on OCA OCP Java Programmer Certification Questions
1Z0-808, 1Z0-809, 1Z0-815, 1Z0-816, 1Z0-817

Moderator: admin

Post Reply
nnavlani
Posts: 8
Joined: Sat Aug 02, 2025 11:21 pm
Contact:

About Question enthuware.ocpjp.v21.2.3312 :

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

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

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

Post by admin »

Option 1 is correct and is indeed marked as a correct option.

Post Reply

Who is online

Users browsing this forum: No registered users and 114 guests