Question: Which of the following is true regarding comparing in Java? A comparable can have multiple compareTo ( ) functions A comparator uses the compare (
Which of the following is true regarding comparing in Java?
A comparable can have multiple compareTo functions
A comparator uses the compare function and a comparable uses the
compareTo
function
A comparable is all that is necessary to compare by multiple data members
We use a separate class for each comparator that we need
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
