{
  public Object get(int index)  {    if (elements == null)      {        throw new IndexOutOfBoundsException("list is empty");      }    if (index < 0 || index >= elements.length)      {        throw new IndexOutOfBoundsException("index=" + index + ", size="                                            + size());      }    return elements[index];  }