What is the output of,
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);
System.out.print(m);
System.out.print(m.size());
for( Map.Entry< String, Integer >e: m.entrySet())
System.out.print(e.getKey() + " " + e.getValue());
}
}
3courses 25gfg 10ide 16
Error
{courses=25, gfg=10, ide=16}3courses 25gfg 10ide 16
None of these
This question is part of this quiz :
HashMap and LinkedHashMap CIP