Java, Spring, Microservices, Interview, Coding.
cityMap.put(new Key(3, "NW"), "Newark"); cityMap.put(new Key(4, "NP"), "Newport"); System.out.println("size before iteration " + cityMap.size()); Iterator <Key> itr = cityMap.keySet().iterator(); while (itr.hasNext()){ System.out.println(cityMap.get(itr.next())); } System.out.println("size after