如果我的价值"foo",以及HashMap<String> ftw对于其ftw.containsValue("foo")返回true,我怎么能得到相应的钥匙?我是否必须遍历hashmap?最好的方法是什么?
"foo"
HashMap<String> ftw
ftw.containsValue("foo")
true
java hashmap
hashmap ×1
java ×1