About Question enthuware.ocpjp.v7.2.1171 :

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

Moderator: admin

Post Reply
Student
Posts: 53
Joined: Fri Sep 20, 2013 7:20 am
Contact:

About Question enthuware.ocpjp.v7.2.1171 :

Post by Student »

What's wrong with a Queue? Isn't that an interface that allows non-unique objects in the order of insertion?

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

Re: About Question enthuware.ocpjp.v7.2.1171 :

Post by admin »

I guess an argument can be made for Queue as well but Queue does not stipulate anything about the uniqueness of its elements. It depends on the implementation. You could have a valid Queue implementation that doesn't allow non unique elements.

While List API specifically says that it allows non unique elements.

HTH,
Paul.
If you like our products and services, please help us by posting your review here.

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 228 guests