ProAnswers.org

What is difference between Comparable and Comparator?

  1. Comparable provides only one sort of sequence.

  2. Comparator provides multiple sort of sequences.

  3. It provides one method named compareTo().

  4. It provides one method named compare().

  5. It is found in java.lang package.

  6. it is found in java.util package.s

  7. If we implement Comparable interface, actual class is modified.

  8. Actual class is not modified.