Same?function:
?
Normal:
for(String tmp:userThird.keySet()){
? ? ? ? ? ? ? ? ? ? thirdInfo.add(userThird.get(tmp).getType());
}
Better:
for (Map.Entry<String, UserLogin> e : userThird.entrySet()) {
? ? ? ? ? ? ? ? ? ? thirdInfo.add(e.getValue().getType());
}
原文:http://harborchung.iteye.com/blog/2252633