Java tutorial
//package com.java2s; import java.util.ArrayList; import java.util.HashMap; import java.util.Iterator; import java.util.Map; import java.util.Set; public class Main { public static ArrayList<String> getHashMap(HashMap<String, String> hm) { ArrayList<String> a = new ArrayList<String>(); Set s = hm.entrySet(); Iterator it = s.iterator(); while (it.hasNext()) { Map.Entry m = (Map.Entry) it.next(); a.add(m.getKey() + "\t" + m.getValue()); } return a; } }