Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4117287

ArrayList.add and addAll won't let you add to the end of the ArrayList

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P2 P2
    • 1.2.0
    • 1.2.0
    • core-libs
    • None
    • 1.2beta4
    • generic, x86
    • generic, windows_95
    • Not verified

      ArrayList a = ...;

      a.add(a.size(), newElement);

      should work, but throws an IndexOutOfBoundsException.

            jjb Josh Bloch (Inactive)
            jjb Josh Bloch (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: