This asset provides a reusable code which can be used to retrieve the Keys when Values are given in Java maps.
BidiMap bidimap = new DualHashBidiMap(); bidimap.putAll(theMap); String myKey= bidimap.inverseBidiMap().get("Mumbai").toString(); System.out.println("The Key is :" + myKey) ;