how can i put an object as the value in a hashmap eg hashMap.put("some key" , Object); in my code i have a user enter in a jewel color where it should look up the hash table with the jewel colour as the key returning the jewel as an object in which i can then manipulate with other methods. how do i do this? thankyou
You seem to be asking to different questions at the same time. First you say you want to "put" a value, this implies you wish to assign an value into the hashmap. Than you say you want to "look up", which implies you want to extract a value. The answer to assigning a value was posting by Marilyn. To extract a value you can the "get" method.
Please ignore post, I have no idea what I am talking about.