• Post Reply Bookmark Topic Watch Topic
  • New Topic

Sorting object properties and some exception rules to sorting ?  RSS feed

 
Amandeep Singh
Ranch Hand
Posts: 853
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i am sorting the alphabet Strings like asdf,fdf,gdg,fdfsg, FREE

but i want to make sure whenever String value is like FREE. then i want to make it appear last in the list.
So i have written a custom code to do sorting. the interesting thing that is happening here is both the below snippets
do work same.

Question: i want to know is this the recommended approach to do or any better way preferred?


or

 
Amandeep Singh
Ranch Hand
Posts: 853
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Any thoughts would be appreciated,
 
Rob Spoor
Sheriff
Posts: 21131
87
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
http://faq.javaranch.com/java/PatienceIsAVirtue
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!