Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Tim Cooke
Sheriffs:
  • Rob Spoor
  • Liutauras Vilda
  • paul wheaton
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Mikalai Zaikin
  • Carey Brown
  • Piet Souris
Bartenders:
  • Stephan van Hulst

Sorting MAP by values

 
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
posted Today 1:50 PM
--------------------------------------------------------------------------------
Hi,

I am opening this again with specific question.

I am reading some data from properties file, & need to sort the map by values.

E.g test.properties

1 = Hi
2 = hello
3 = Bye
4 = Thank You
5 = Thank You
6 = Bye

I tried with following




Problem with this code is it overrides the duplicate values.

Is there any other way I can sort the data, please suggest.

Thanks in advance.
Waez Ali.
[ July 21, 2008: Message edited by: Waez Ali ]
 
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
Your original question was moved here. Please continue any discussion there, rather than starting a new topic.
[ July 21, 2008: Message edited by: Paul Sturrock ]
 
That's my roommate. He's kinda weird, but he always pays his half of the rent. And he gave me this tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
    Bookmark Topic Watch Topic
  • New Topic