Vidyalelo
Java Programming · Q3

Java Collections Framework

Programming · Java Programming · question 3

Q3

What is the primary difference between a `List` and a `Set` in the Java Collections Framework?

A.
A `Set` allows duplicate elements, while a `List` does not
B.
A `List` is unmodifiable, while a `Set` is modifiable
C.
A `List` allows duplicate elements, while a `Set` does not
Answer
D.
A `Set` is indexed, while a `List` is not

Answer: Option C

Solution

Answer: Option C
No explanation is given for this question Let's Discuss on Board