code: public void add(String str) {
          String[] tmp;
  
          if (size == data.length) {
              tmp = new String[data.length + GROW];
              System.arraycopy(data, 0, tmp, 0, data.length);
              data = tmp;
          }
          data[size] = str;
          size++;
      }
docs: Adds a new element to the end of the List.
  @param  str  new element