code: public static char[] addToCharArray(char[] a, char value) {
  		
  		if(a == null || a.length == 0) {
  			return new char[] {value};
  		}
  		
  		char[] array = new char[a.length + 1];
  		array[a.length] = value;
  		return array;
  	}
docs: add value to the end of array a
  @param a array to add to, may be null
  @param value value to add to a
  @return new array with value added to the end