Sorting

Discussion on Java at the COJ. This is the place to clear your doubts about these languages, and to share with the community the new things you learn about them.
Post Reply
adrianc
Posts: 19
Joined: 7 years ago
Location: UPR, Cuba
Gender: None specified

Sorting

Post by adrianc » 6 years ago

i would like to know how to sort a Vector or an ArrayList without converting it to an array...



gmo
Posts: 6
Joined: 7 years ago
Gender: None specified

Re: Sorting

Post by gmo » 6 years ago

I don't know if you already know it, but Collections.sort() does the trick you can even use your own Comparator class to make the sort.

Post Reply

Return to “Java”