Question: If you want to use Collections.sort() with a class you have created, you must _________________. a. Write your own compare To() method b. Overload the

If you want to use Collections.sort() with a class you have created, you must _________________.
a. Write your own compare To() method
b. Overload the < and > operators
c. Write your own toString() method
d. Write both a compare To() method and toString() method

Step by Step Solution

3.35 Rating (164 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

a If a class will use ... View full answer

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 Java Programming Questions!