package com.ssm.cts.test; import java.util.Enumeration; import java.util.HashMap; import java.util.Hashtable; import java.util.Iterator; import java.util.Map; import java.util.Stack; import java.util.Vector; public class ClassTest { // 测试 public static void main(String[] args) { Map<String, String> map = new HashMap<String, String>(); map.put("jiang", "9001"); map.put("zhi", "9002"); map.put("hao", "9003"); Iterator<String> iterator = map.keySet().iterator(); while (iterator.hasNext()) { Object key = iterator.next(); System.out.println(key +":" + map.get(key)); } } }