public static String[] addStringToArray(String[] array,String str){
  if (ObjectUtils.isEmpty(array)) {
    return new String[]{str};
  }
  String[] newArr=new String[array.length + 1];
  System.arraycopy(array,0,newArr,0,array.length);
  newArr[array.length]=str;
  return newArr;
}

public static String [ ] addStringToArray ( String [ ] array , String str ) { if ( ObjectUtils . isEmpty ( array ) ) { return new String [ ] { str } ; } String [ ] newArr = new String [ array . length + 1 ] ; System . arraycopy ( array , 0 , newArr , 0 , array . length ) ; newArr [ array . length ] = str ; return newArr ; }
append the given string to the given string array , returning a new array consisting of the input array contents plus the given string .
