let's say there is a hashmap of strings in java and given a key you want to retrieve the corresponding value - i thought one could do it just by passing the string -- No it does not work that way -
since the get method takes only an object as a parameter - so typically the way to do would be to get all the keys from the hashmap and the iterate over the keys to get the corresponding values --
Arbitary Number of Arguments in Java
I saw a method with the following signature today - public List
http://java.sun.com/docs/
No comments:
Post a Comment