This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
Can anyone show me how to build a hashtable to test for some string values to see how they would hash into a table. It's late and I may not be to asking this just right.I want to make a test hashtable, insert some words and see where they are put in the table. would like the size of the table to be 101, but everytime I try to call what I've done I get an error saying I can't use  to find the position. I can give you what I have for code but it's far from finished I fear.
I guess you are more used to C++/STL than Java, as the program above has a lot of other conversion issues too. In Java, a variable is just a reference, so you always need to initialize them before use. T is declared as a reference to a Hashtable, for example, but nowhere does it say T = new Hashtable(), so T is always null. Likewise for M which is never initialized and so remains at 0 (it may look as if it is initialized in one of the constructors, but that actually just assigns a value to a local variable which is then discarded).
I want to thank you both, I am just getting started at this and I know there are a lot of problems with the code. Is there a way to write a hashtable without using Java's Hashtable class to solve the problem above?