Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes Beginning Java and the fly likes Using lookup in Hash tables Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Using lookup in Hash tables" Watch "Using lookup in Hash tables" New topic
Author

Using lookup in Hash tables

Nicole Collins
Greenhorn

Joined: Jan 12, 2010
Posts: 2
I am taking my first course in Java, and I am way off base.
I'm trying out exercises from The Practice of Programming book. I'm working on this exercise:

Change lookup so that if the average list length becomes more than x, the array is grown automatically by a factor of y and the hash table is rebuilt.

Any help will do..
Cindy Carney
Ranch Hand

Joined: Jan 12, 2010
Posts: 57
It sounds like you're coding your own hashtable there, instead of using Java's Hashtable class. I bet a C programming language newsgroup would be a good place for a question like that, if you don't find people that 'roll their own' hashtable here.
Nicole Collins
Greenhorn

Joined: Jan 12, 2010
Posts: 2
Thanks for the response Cindy.
This is actually a Java course, so I'm stuck on figuring out where to start, etc.
Cindy Carney
Ranch Hand

Joined: Jan 12, 2010
Posts: 57
Well, maybe this will help. Animation of Hash Table

It shows you in a Java applet, how a hash table works. Click the 'Execute' button, then the 'Run' button, to see it insert numbers into a hashtable one by one, while simultaneously showing the code it's executing.

It offers several different hash algorithms to watch.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Using lookup in Hash tables
 
Similar Threads
JNDI local context
NamingException
HashMapDefinition
Hash tables
Unable to get JNDI lookup for JMS Topic Connection Factory