How to implement HashTable without the use of Collections Package?

Hi,I have a doubt of implementing Hashtable without using Collections Pacakge.I do also need some inputs on Datastructures and implentation in Java
[168 byte] By [dmvsatyakumar@gamil.coma] at [2007-11-27 8:41:24]
# 1
Why?
ejpa at 2007-7-12 20:40:20 > top of Java-index,Java Essentials,Java Programming...
# 2
This was an interview question for me.So i just want to give a thought against this.Any any one help me?
dmvsatyakumar@gamil.coma at 2007-7-12 20:40:20 > top of Java-index,Java Essentials,Java Programming...
# 3
My answer in the interview would be exactly the same. Why? Why would I waste your time and money reimplementing a hash table when Sun have already provided not one but two?
ejpa at 2007-7-12 20:40:20 > top of Java-index,Java Essentials,Java Programming...
# 4
Hey i am bothered about the answer in the interview.I want a give a look into this.Now this is of my own intrest.
dmvsatyakumar@gamil.coma at 2007-7-12 20:40:20 > top of Java-index,Java Essentials,Java Programming...
# 5
Hey i am not bothered about the answer in the interview.I want a give a look into this.Now this is of my own intrest.
dmvsatyakumar@gamil.coma at 2007-7-12 20:40:20 > top of Java-index,Java Essentials,Java Programming...
# 6
> Hey i am not bothered about the answer in the> interview.> I want a give a look into this.Okay great.Well for your own use then, don't do this. Why waste your time and money reimplementing a hash table when Sun have already provided not one but two?
cotton.ma at 2007-7-12 20:40:20 > top of Java-index,Java Essentials,Java Programming...
# 7
Re-Inventing the wheel!!!
achyuthba at 2007-7-12 20:40:20 > top of Java-index,Java Essentials,Java Programming...
# 8
Round and round it goes...
cotton.ma at 2007-7-12 20:40:21 > top of Java-index,Java Essentials,Java Programming...
# 9
Or if you want to study CS:Data Structures 101, please do so. This is really not the place to ask.
ejpa at 2007-7-12 20:40:21 > top of Java-index,Java Essentials,Java Programming...
# 10

> Hey i am not bothered about the answer in the

> interview.

> I want a give a look into this.

> Now this is of my own intrest.

So look at the source for Hashtable and HashMap, as well as the source for the collections stuff that they use and see how it was done.

The source is in src.zip in the JDK download.

jverda at 2007-7-12 20:40:21 > top of Java-index,Java Essentials,Java Programming...
# 11
Or go out and buy Bob Sedgewick's book on Data Structures, Java edition, or if you really want to learn something go get Knuth, Art of Computer Programming, volumes I and III.
ejpa at 2007-7-12 20:40:21 > top of Java-index,Java Essentials,Java Programming...
# 12
I hope this code will help you out. http://www.devhood.com/Tutorials/tutorial_details.aspx?tutorial_id=389 http://www.gmonline.demon.co.uk/cscene/CS5/CS5-02.html
M.Ali.Amina at 2007-7-12 20:40:21 > top of Java-index,Java Essentials,Java Programming...