You could use a HashMap, and generate strings.hashCode() as the key. This would eliminate duplicates. And to get an array Collections<String> c = hm.values()
Object[] array = c.toArray()