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
Posts: 19
Joined: 8 years ago
Location: UPR, Cuba
Gender: None specified


Post by adrianc » 7 years ago

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

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

Re: Sorting

Post by gmo » 7 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”