• Post Reply Bookmark Topic Watch Topic
  • New Topic

How can we sort the Items in java.awt.List

 
Sarath Mohan
Ranch Hand
Posts: 213
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello ranchers
I have List object in which i am storing a lot of names.
I want to display these names in alphabetical order.
Any clue?
Thanks
Binu
 
Frank Carver
Sheriff
Posts: 6920
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try Collections.sort(myList)
 
my overalls have superpowers - they repel people who think fashion is important. Tiny ad:
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!