What is difference between comparator and comparable.? | Sololearn: Learn to code for FREE!

+1

What is difference between comparator and comparable.?

while we are working with treeset in collections to achieve sorting order which is preferable

5/25/2017 11:59:02 AM

kalva sainath

1 Answer

New Answer

+4

https://www.javatpoint.com/difference-between-comparable-and-comparator in treeset , comparator is preferable....