Computer Science, asked by Ashikcherry, 5 hours ago

which interface should a class implement so that it can be sorted based on many fiels/criteria​

Answers

Answered by chinmaychail567
0

Answer:

If any class implements Comparable interface in Java then collection of that object either List or Array can be sorted automatically by using Collections. sort() or Arrays. sort() method and objects will be sorted based on there natural order defined by CompareTo method.

Similar questions