import java.util.ArrayList;
import java.util.List;
import java.util.ListIterator;
import java.util.Map;
import java.util.HashMap;
import java.util.Set;
import java.util.Iterator;
public class TestHashMap {
public static void main(String[] args)
{
HashMap map = new HashMap();
map.put("1", "xiaohong");
map.put("2", "xiaowang");
map.put("3", "xiaoli");
Set s = map.keySet();
Iterator it = s.iterator();
while(it.hasNext())
{
String key = (String)it.next();
String value = (String)map.get(key);
System.out.println("key="+key+" value="+value);
}
}
}