Why is there no SortedList in Java?

In Java there are the SortedSet and SortedMap interfaces. Both have a place with the Java Collections system and give an arranged method for getting to the components.

In any case, in my comprehension there is no SortedList in Java. You can utilize java.util.Collections.sort() to sort a rundown.

Any thought why it is planned that way?

What do you want a List to be sorted by? A list is a list. You do not have a fix attribute like a key where you can sort it by.

1 Like

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.