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 hashtable Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "hashtable" Watch "hashtable" New topic


him jain
Ranch Hand

Joined: Feb 05, 2010
Posts: 56
I want to create a hashtable but I have two keys and one value.
means i have the unique pair of key to determine value.
Can you suggest me how to go for it?
I need an efficient solution.

--Himanshu Jain
Sridhar Santhanakrishnan
Ranch Hand

Joined: Mar 20, 2007
Posts: 317
1) Just create a class with the two keys as properties
2) use the class's objects as keys instead.
I agree. Here's the link:
subject: hashtable
It's not a secret anymore!