I have an odd sort of question. Let's say I have two Maps (map1 and map2) where:
map2's keys can only consist of map1's values.
My end goal is to print out the Integer from map2, which represents the value mapped to the key from map1.
For example, let's say map1's keys and values looked like:
and map2's keys and values looked like:Quote:
In the end, I am wanting to print out something like:Quote:
Does anyone have any ideas how to go about doing this? I'm restricted to the Map Interface methods (as it is unknown to me which implementing class was used to make the Map).Quote:
"str1" = 2
"str5" = 3
"str2" = 6