Difference between comparator and comparable
Answers
Answered by
2
Comparable provides single sorting sequence. we can sort the collection on the basis of single element such as id or name or price etc.
Comparator provides multiple sorting sequence . we can sort the collection on the basis of multi element such as id name etc....
Comparator provides multiple sorting sequence . we can sort the collection on the basis of multi element such as id name etc....
Similar questions