public static String[] removeDuplicateStrings(String[] array){
  if (ObjectUtils.isEmpty(array)) {
    return array;
  }
  Set<String> set=new TreeSet<String>();
  for (  String element : array) {
    set.add(element);
  }
  return toStringArray(set);
}

public static String [ ] removeDuplicateStrings ( String [ ] array ) { if ( ObjectUtils . isEmpty ( array ) ) { return array ; } Set < String > set = new TreeSet < String > ( ) ; for ( String element : array ) { set . add ( element ) ; } return toStringArray ( set ) ; }
remove duplicate strings from the given array . also sorts the array , as it uses a treeset .
