public static List<String> removeDuplicate(List<String> list) { HashSet<String> h = new HashSet<String>(list); list.clear(); list.addAll(h); return list; }