java - Sort arraylist of letters and numbers -


i'm trying sort arraylist of strings made of numbers , letters, example of list once sorted be:

name 1 name 2 name 3 name 11 name 12 name 13 

but when use collections.sort() sorts way:

name 1 name 11 name 12 name 13 name 2 name 3 

any ideas type of sort i'm looking called or how it?

strings ordered alphabetically default. need implement own comparator<string> or use object implements comparable (or use comparator it) solve this, since strings using mixtures of words , integers.


Comments

Popular posts from this blog

linux - xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection -

c++ - qgraphicsview horizontal scrolling always has a vertical delta -