List listKey = new ArrayList(); List listValue = new ArrayList(); Iterator it = map.keySet().iterator(); while (it.hasNext()) { System.out.println(map); String key = it.next().toString(); listKey.add(key); listValue.add(map.get(key)); } System.out.println("Convert Finished !");
//output the context of the ArrayList for(int i =0 ;i<listKey.size();i++){ System.out.println(listKey); System.out.print("Key :"+listKey.get(i)); System.out.println(" Value :"+listValue.get(i)); } } }