SMALL
String[] test = {"1","2","3","1","2"};
System.out.println("before length=" + test.length);
 
test = new HashSet<String>
(Arrays.asList(test)).toArray(new String[0]);
System.out.println("after length=" + test.length);
 
for(String s:test){
    System.out.println(s);            
}
 
/* result 
before length=5
after length=3
1
2
3

*/


LIST
블로그 이미지

SeoHW

,