Java tutorial
//package com.java2s; import java.util.*; public class Main { public static String[] arrayUnique(String[] a) { // array_unique List<String> list = new LinkedList<String>(); for (int i = 0; i < a.length; i++) { if (!list.contains(a[i])) { list.add(a[i]); } } return (String[]) list.toArray(new String[list.size()]); } }