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

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

java - Output of Eclipse is rubbish -

jquery - Confused with JSON data and normal data in Django ajax request -