Is Overoading an hashmap possible? | SoloLearn: Learn to code for FREE!

0

Is Overoading an hashmap possible?

What if i wanted to use one key for two objects. As in Hashmap <String, Integer, String> . for <State , Population, Capital > Does it work and how do I go about it?

1/10/2017 7:17:33 AM

Soaga Kingsley

1 Answer

New Answer

+2

you can use nested hashmap for example: Hashmap <String, Hashmap <Integer, String>> it maps string key to a tuple of hashmap