posted 22 years ago
List, Set, Map, and Collection are all interfaces. So you can't reject Collection based on whether or not it's a class.
I think the question is worded poorly and should specify what interface you would implement, but the concepts are the same.
The question also seems be be ambiguous because it seems to be saying that each element should be unique, the elements should not be ordered, and no special search facility is needed.
From that, I would say a set would qualify unless a set by nature has a special search facility?
But the question could also be meaning that the elements should ordered and unique, with no special search facilities necessary.
In this case, one would need a collection and impose their own contraints on it to achieve that effect (using the options given in the question).
What was the explanation of the author of your question?
April