PRACTICE / UNDERSTAND / REPEAT

Java practice question

Practice collections with self-contained questions. Check your answer, then use the explanation to understand the reasoning.

1 questionAnswers explainedFree · no login

Try this question

Collections · MCQQuestion link ↗

Which collection type guarantees unique elements?

Choose one answer
Answer & explanation

Answer: Set

A `Set` models unique elements. A `List` permits duplicates and preserves positional order.