How to Get Values from List of HashMap?
问题 I have a List of HashMap 's which has key of type Integer and value of type Long . List<HashMap<Integer, Long>> ListofHash = new ArrayList<HashMap<Integer, Long>>(); for (int i = 0; i < 10; i++) { HashMap<Integer, Long> mMap = new HashMap<Integer, Long>(); mMap.put(Integer.valueOf(i), Long.valueOf(100000000000L+i)); ListofHash.add(mMap); } Now, how do I retrieve the key and value from the list of HashMap ? If using Collection class is the solution, please enlight me. Update 1: Actually i am