*
The moose likes Beginning Java and the fly likes Adding and sorting Hashmaps. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Beginning Java
Reply locked New topic
Author

Adding and sorting Hashmaps.

Keith Anderson
Greenhorn

Joined: Apr 19, 2002
Posts: 20
I am trying to create a treemap or hashmap that will sort items by there key.
Also I need it to add like key's.
------------

as an example John Doe is added twice.
Instead of adding up a total. it just replaces it.
I am guessing there is a significant amount of code I need to write.
I do not need this written out for me, I just am looking for the direction to go.


Thank you JavaRanch, and all of your people posting.




To Be Thus is Nothing<br />Yet<br />To Be Safely Thus
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14687
    
  16

Closing this thread. Continue there.


[My Blog]
All roads lead to JavaRanch
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Adding and sorting Hashmaps.
 
Similar Threads
comparator
Please explan how set.iterator() gets called when set is of type interface?
HashMap Query
sorting
Collections Frame work