File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes Good Hash Anyone? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Good Hash Anyone?" Watch "Good Hash Anyone?" New topic

Good Hash Anyone?

John James1us

Joined: Jun 16, 2002
Posts: 4
Does anyone know where I could get some code for Hash Tables? I would really love some simple examples, thankx.
John James1us

Joined: Jun 16, 2002
Posts: 4
I have changed my name to John James1us to follow standards here, and I would still like to know if anyone has any code examples, thank you.
David O'Meara

Joined: Mar 06, 2001
Posts: 13459

If you're looking for the code for the Hashtable class, the source for the java classes is available as src.jar when you install the JDK.
If you are looking for code to generate a hash code for a given input, you should read Effective Java: Programming Language Guide by Joshua Bloch ( link is to the Javaranch Bunkhouse, Advanced Java section )
Then again, I recommend reading the book anyway - 10 horseshoes isn't for nothing.
[ June 16, 2002: Message edited by: David O'Meara ]
I agree. Here's the link:
subject: Good Hash Anyone?
It's not a secret anymore!