map遍历时,使用key找value的好处是遍历速度最快
Map hashMap = new HashMap<>(); for (Integer key : hashMap.keySet()) { String value = hashMap.get(key); Log.i(TAG, "key: " + key +"value: "+value); }
Map hashMap = new HashMap<>(); for (Integer key : hashMap.keySet()) { String value = hashMap.get(key); Log.i(TAG, "key: " + key +"value: "+value); }