Question: If myComparator is a suitable Comparator instance and myComparator.compareTo(x, y) returns 5, which of the following statements about x and y is true? A. x

If myComparator is a suitable Comparator instance and myComparator.compareTo(x, y) returns 5, which of the following statements about x and y is true?

  • A. x and y are out of order, i.e., y comes before x according to MyComparator.
  • B. x and y are in their desired order, i.e., x comes before y according to MyComparator.
  • C. x and y are of incompatible types according to MyComparator.
  • D. x and y are equal according to MyComparator .

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!