Look into one of the implementations of java.util.Set(
AbstractSet, HashSet, LinkedHashSet or TreeSet).
All you have to do is call add() passing in your
Strings
and it will "remove" duplicates for you.
After that if you need to use it as an array just call
the toArray() function of Set which returns an
Object[] .