PRACTICE / UNDERSTAND / REPEAT

Java: Collections

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

42 questionsAnswers explainedFree · no login
Question 1 of 42
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.