【发布时间】:2021-09-21 20:56:42
【问题描述】:
我想要一个基于值的特定条件的 HashMap 中的特定键。例如:
我的 HashMap 的类型是 <String,Integer>。
Map<String,Integer> getValuesInMap = new HashMap<String,Integer>();
Output = {Python=1, Java=1, OOPS=2, language=1, Ruby=3, Hey=1}
我想从这个映射中检索整数计数(即值)大于 1 的键。
【问题讨论】:
标签: java collections hashmap