private static String[] addElementToArray(String[] array,String element){
  Arrays.copyOf(array,array.length + 1);
  array[array.length - 1]=element;
  return array;
}

private static String [ ] addElementToArray ( String [ ] array , String element ) { Arrays . copyOf ( array , array . length + 1 ) ; array [ array . length - 1 ] = element ; return array ; }
convenience method to add extra element to an array
