📅  最后修改于: 2022-03-11 14:52:46.962000             🧑  作者: Mango
HashMap efficientCounter = new HashMap();
for (String a : sArr) {
MutableInteger initValue = new MutableInteger(1);
MutableInteger oldValue = efficientCounter.put(a, initValue);
if(oldValue != null){
initValue.set(oldValue.get() + 1);
}
}