What is the output of the code,
import java.util.*;
class HelloWorld {
public static void main(String[] args) {
HashMap<String, Integer> m = new HashMap<String, Integer>();
m.put("gfg", 10);
m.put("ide", 16);
m.put("courses", 25);
if( m.containsKey("ide"))
System.out.println("yes");
else
System.out.println("no");
m.remove("ide");
System.out.println(m.size());
}
}
no
3
yes
3
yes
2
no
2
This question is part of this quiz :
HashMap and LinkedHashMap CIP