How can you sort a ArrayList?

  1. By creating an implementation of the java.lang.Comparable interface.

  2. java.util.Collections.sort()

  3. java.utils.Arrays.sort()

  4. By creating an implementation of the java.lang.Comparator interface.


Correct Option: A,B,D

Find more quizzes: