【发布时间】:2021-11-10 19:18:38
【问题描述】:
以高效的方式从 Java Hashmap 值中删除 Html 标记
main(String str[]){
HashMap<String, String> hm = new HashMap<>();
hm.put("A", "Apple");
hm.put("B", "<b>Ball</b>");
hm.put("C", "Cat");
hm.put("D", "Dog");
hm.put("E", "<h1>Elephant</h1>");
}
// we have to remove only html tags which have like B = <b>Ball</b> so the B = Ball
// and E = <h1>Elephant</h1> should be E =Elephant
【问题讨论】:
标签: java hashmap iterator coding-efficiency