code: public static String[] removeDuplicates(String[] input)
      {
          if (input != null)
          {
              if (input.length > 0)
              {
                  Set<String> inputSet = new HashSet<String>(Arrays.asList(input));
                  if (inputSet.size() > 0)
                  {
                      return inputSet.toArray(new String[inputSet.size()]);
                  }
              }
          }
          return null;
      }
docs: Returns a valid string array without dulicates or null, if empty
  
  @param input original string array
  @return resultant string array