举个栗子:hashMap.getOrDefault(num,0)

表示通过num这个key查找对应的value,如果发现hashMap中没有num这个key,就返回默认值0,即第二个参数,否则返回num对应的value