I have an ArrayList, and I want to remove repeated strings from it. How can I do this?
ArrayList
In Java 8:
List deduped = list.stream().distinct().collect(Collectors.toList());
Please note that the hashCode-equals contract for list members should be respected for the filtering to work properly.