File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
JavaRanch » Java Forums » Java » Beginning Java
Reply locked New topic

Adding and sorting Hashmaps.

Keith Anderson

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é

Joined: Nov 24, 2005
Posts: 14688

Closing this thread. Continue there.

[My Blog]
All roads lead to JavaRanch
I agree. Here's the link:
subject: Adding and sorting Hashmaps.
It's not a secret anymore!