Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

sorting an arraylist by the length of string?

807606Mar 2 2007 — edited Mar 2 2007
Hi

I've done quite a bit of searching today but no luck, I am looking to sort the list of words in an arraylist by the size of the "String"

arraylist contains dog, car, dude, football

it should but football at the start etc

I've tried using Arrays.sort() but no luck.

thank you
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 30 2007
Added on Mar 2 2007
9 comments
4,913 views