1 public static String[] array_unique(String[] a) { 2 Set<String> set = new HashSet<String>(); 3 set.addAll(Arrays.asList(a)); 4 return set.toArray(new String[0]); 5 }