使用HashMap时报错空指针异常(NullPointerException)
摘要:
HashMap<String, Integer> hp = new HashMap<>(); hp.put("I", 1); char[] c = s.toCharArray(); for (char sc : c ) { result += hp.get(sc); } 在使用HashMap解决Le 阅读全文
posted @ 2023-05-27 10:06 她强我扶墙 阅读(226) 评论(0) 推荐(0)
浙公网安备 33010602011771号