Question: In my java program they are asking me to use both the compareTo method as well as one other method in order to sort all
In my java program they are asking me to use both the compareTo method as well as one other method in order to sort all the books in a catalog based on their title and I don't know how. This is what is suppose to be written in one of the classes: You will need to write the code for the compareTo method. This method should have one parameter of Book type. The order of the books is based on the alphabetical order of the title. Note that in order to have this method, your Book class should implement the Comparable
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
