在實際開發中自己常運用到Map集合
在開發中自己運用到
Map<String
String> map=new HashMap<String
String>()
遍歷
Java代碼
Set<String> key = map
keySet()
Iterator<String> it = erator()
while (it
hasNext()) {
String keyV = (String) it
next()
String vb = map
get(keyV)
if (keyV
equals(dd)) {
itemjin = vb;
break;
}
}
Set<String> key = map
keySet()
Iterator<String> it = erator()
while (it
hasNext()) {
String keyV = (String) it
next()
String vb = map
get(keyV)
if (keyV
equals(dd)) {
itemjin = vb;
break;
}
}
From:http://tw.wingwit.com/Article/program/Java/hx/201311/26537.html