collisions are a part of creating a hash table...there's minimal perfect and perfect hash tables which have no collisions and have the same amount of storage space as input storage...but are extremely hard to implement.
Here is an example of what happens when you encounter a collision:
array = "bread"
array = "corn"
array = "steak"
Lets say you have this already in your hash table. You want to hash a word, lets say "turkey", and its key is 0. You do a check if the storage at array is used...it is...this is a collision. Do a check at the next slot down...array...it is also used...another collision. The next slot is free...array...so you put turkey in that position in the array. This is called linear probing. Also, the load factor plays a role in the amount of collisions...which is just the proportion of entries to storage space. Double hashing is what it sounds like...when you encounter a collision...you basically re-hash the word...using a certain method...and come up with a new key.
When you search a word in this hash table...you do the same thing with the word turkey...keep going down the array until you find it...or until you do an entire loop...which would mean it is not in the hash table. When your load factor approaches 1...linear probing becomes highly inefficient...it basically becomes linear searching with a for loop. So like I said just make the table about 2x the size of the amount of words being inputted.
Hope this helps a bit more...I'm assuming you are very close to finishing.
Also what is your method to hashing the words?
I sum all of the ascII values of each letter and use the % symbol in conjunction with the table size to find the key for the word.
So something like this:
Also when I made my hash tables back in school...my professor did not allow us to use the java library for creating hash tables...so I am not familiar with the library's methods which might just have a collision resolution...such as double hashing which you are apparently using. For chaining...a more efficient approach than probing once the load factor approaches 1...we had to use linked-list inside our arrays...so basically a data structure inside another data structure...it was cool.Edited by surfbumb - 8/11/11 at 12:14pm