Link to home
Start Free TrialLog in
Avatar of gudii9
gudii9Flag for United States of America

asked on

comparator interface

i would like to know more about comparator interface. why it is in java.util not in java.lang.

how it is different from comparable interface.

how compare() different from compareTo().

why implementing comparator second method equals() is optional unlike implementing compare() is mandotory
please advise
ASKER CERTIFIED SOLUTION
Avatar of Margaret Green
Margaret Green
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial