Copying LinkedHashset content to new ArrayList?
问题 I've a listView that has some content initially. If the same content it gets, i removed the duplication through linkedhashset . Now, i want copy the linkedhashset contents i.e without duplication contents to new ArrayList . I tried to copy through p.addAll(0,lhm); // P is the instance of ArrayList and lhm is linkedHashset instance But, the ArrayList includes the duplication content too. Example : ArrayList<Price> p = new ArrayList<Price>(); p.add(new Price("Banana", 60)); p.add(new Price(