/**
* 1、map. forEach((key, value) -> System. out. println(key+": "+value));
* Lambada表达式:->
* 2、getOrDefault(key, defaultValue )
*/
* 1、map. forEach((key, value) -> System. out. println(key+": "+value));
* Lambada表达式:->
* 2、getOrDefault(key, defaultValue )
*/
2021-04-13
虽然很基础,但唯一不足就是1.8已经改版了,不知道为什么还用Entry<K,V>,1.8版本后是不存在这个方法的,被Node<K,V>替代了,希望教程会后续说明下,1.8是没有Entry方法,这个也是误区,容易误导
2021-01-11
for (int i = 1; i <= 5; i++) {
String name_key = "zhang" + i;
Integer var2 = userMap.get(name_key);
System.out.println(name_key + " ==> " + var2);
}
String name_key = "zhang" + i;
Integer var2 = userMap.get(name_key);
System.out.println(name_key + " ==> " + var2);
}
2020-12-15