1
2
3
4
5
6
7
8
 
 
// HashSet과 LinkedHashSet의 차이는 중복이 제거 될 때 HashSet은 기존 리스트의 구성요서의 순서가 지켜지지 않는다 
 
List<String> uniqueItems = new ArrayList<String>(new HashSet<String>(returnitems));
 
 
List<String> uniqueItems = new ArrayList<String>(new LinkedHashSet<String>(returnitems));
cs


+ Recent posts