code: public void add(int idx, int ele) {
          ensureCapacity(size + 1);
          System.arraycopy(data, idx, data, idx + 1, size - idx);
          data[idx] = ele;
          size++;
      }
docs: Adds an element to the List. All following elements
  are moved up by one index.
  @param  idx  where to insert the new element
  @param  ele  new element