private static void ma2() {
Scanner scanner = new Scanner(System.in);
System.out.println("输入内容..");
String s = scanner.nextLine();
Map
for(int i = 0;i
map.put(s.charAt(i), 1);
}else{
map.put(s.charAt(i), map.get(s.charAt(i))+1);
}
}
Set
for(Entry
System.out.println("值:"+e.getKey()+"--次数:"+e.getValue());
}
}