class Const {

  public static String[] getDistinctStrings( String[] strings ) {
    if ( strings == null ) {
      return null;
    }
    if ( strings.length == 0 ) {
      return new String[] {};
    }
    HashSet<String> set = new HashSet<>();
    for (String string : strings) {
      set.add(string);
    }
    List<String> list = new ArrayList<>( set );
    Collections.sort(list);
    return list.toArray( new String[0] );
  }

}