This would actually work automatically in
Java 5 (JDK 1.5) due to something called "autoboxing." In JDK 1.4 and older, you have to make it work by hand.
The problem is that the "put" method wants Objects as arguments, but "int" and "float" aren't Objects. What you can do is "wrap" your int and float using the standard wrapper classes "Integer" and "Float":
Note, though, that you have to remember the Hashtable contains Integer keys and Float objects, so when you want to get out, say, the transaction for id 123, you have to do
float transaction = ((Float) h.get(new Integer(123))).floatValue();