You are on page 1of 1

public class LinkedHashMapTest {

public static void main(String[] args) {


// TODO Auto-generated method stub
Map mm=new LinkedHashMap();
mm.put("a",1);
mm.put("b", 2);
mm.put("d",5);
mm.put("e", "f");
System.out.println(mm);
Set set=mm.keySet();
Iterator it = set.iterator();
while(it.hasNext()){
System.out.println(mm.get(it.next()));
}
}
}

You might also like