private Map<Integer,String> selected = new HashMap<Integer,String>();
selected.put(key,value);
方法一:Iterator it =selected .keySet().iterator();
while (it.hasNext()) { Integer key=(Integer)it.next(); String xuehao=selected .get(key);
}方法二: Iterator it=adapter.getSelected().entrySet().iterator();//效率较高 while (it.hasNext()) { Integer key=(Integer)it.next(); String xuehao=selected().get(key); }
时间: 2024-10-06 06:30:03