Multiple choice

Which of the following statements is/are true?

  1. TreeSet class ensures that the elements will be sorted in the natural ascending order.

  2. HashSet class does not maintain the order of the elements.

  3. HashSet ensures that the elements have no duplicacy.

  4. Both (2) and (3).

  5. (1), (2) and (3) all are true.

Reveal answer Fill a bubble to check yourself
E Correct answer
Explanation

Correct choice