code: public char[] toCharacterArray() {
      char[] copy = new char[size];
      for (int i = 0; i < size; i++) {
        copy[i] = elements[i];
      }
      return copy;
    }
docs: Converts this <code>CharacterArray</code> to an array of chars.
  
  @return An array of chars containing the same elements as this array.