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
a If a class will use ... View full answer
Get step-by-step solutions from verified subject matter experts
