Page 1 of 1

About Question enthuware.ocpjp.v7.2.1171 :

Posted: Fri Sep 27, 2013 1:44 pm
by Student
What's wrong with a Queue? Isn't that an interface that allows non-unique objects in the order of insertion?

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

Posted: Fri Sep 27, 2013 2:13 pm
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.