List<String> list=new ArrayList<String>(); Set set=new HashSet(list); list.clear(); list.addAll(set);