Is it possible for us to implement a HashMap with one key and two values. Just as HashMap?
Please do help me, also by telling (if there is no way) any other way to
Try LinkedHashMap, sample:
Map map = new LinkedHashMap(); map.put('1','linked');map.put('1','hash'); map.put('2','map');map.put('3','java');..
output:
keys: 1,1,2,3 values: linked,hash, map, java
keys: 1,1,2,3
values: linked,hash, map, java