如何遍历 HashMap

如何遍历 HashMap
HashMap maps=new HashMap();
Iterator iterator=maps.keySet().iterator();
				while (iterator.hasNext()) {
					id=(String) maps.get(iterator.next());
					sql="delete from dir where  id='"+id+"'";
					System.out.print(sql);
					stmt.addBatch(sql);
				}

你可能感兴趣的:(java,sql)