java - Lexicographically Sort -


i using linkedlists add() elements, wondering how can lexicographically sort them can output them. or have create own function?

thanks

if elements implement comparable, can this:

collections.sort(mylist); 

many java standard classes such string, integer, etc, implement comparable - if lists hold these types, there's nothing special need do.


Comments

Popular posts from this blog

sql - text truncated using perl DBI insert -

c++ - Is it possible to compile a VST on linux? -

php - Pass object by reference or value -