import java.util.*; public class Demo { public static void main(String args[]) { // Create hash map HashMap hm = new HashMap(); hm.put("Wallet", new Integer(700)); hm.put("Belt", new Integer(600)); hm.put("Backpack", new Integer(1200)); System.out.println("Map = "+hm); Collection getValues = hm.values(); System.out.println("\nValues..."); Iterator i = getValues.iterator(); while (i.hasNext()) { System.out.println(i.next()); } } }