i have to impliment a chained hash table. in this prog i am using java.util.LinkedList.
in one node of linklise i have to store two object--
1)key value
2)value
but java.util.LinkedList. provide add(object) method. that means i can not add two elements in one node of linked list.
then how to implement it ??
please suggest.


thanks

i am using array of linked list

Since that class's add method takes one argument, you will have to merge all the objects you want to save in the list into a single class that you can put into the list.

In your design, how will you find and retrieve the value for a key passed to your class?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.18 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.