Whenthere is necessity store the key value pairs, should go for the
hashtable or hashmap, preferred one is Hashmap as the hashtable is
synchronized. The basic objective is to maintain the pairs. Knowing the key you can iterate through these collections and get the values.
Asked In: Many Interviews |
Alert Moderator