java.lang.IndexOutOfBoundsException

Index: 2, Size: 2

Samebug tips1

Thrown to indicate that an index of some sort (such as to an array, to a string, or to a vector) is out of range. Applications can subclass this class to indicate similar exceptions.

Don't give up yet. Our experts can help. Paste your full stack trace to get a solution.

Solutions on the web6634

  • via Coderanch by Matthew Busse, 9 months ago
    Index: 2, Size: 2
  • via Coderanch by levi sleight, 11 months ago
    Index: 2, Size: 2
  • via Coderanch by David Starr, 9 months ago
    Index: 2, Size: 2
  • Stack trace

    • java.lang.IndexOutOfBoundsException: Index: 2, Size: 2 at java.util.ArrayList.rangeCheck(ArrayList.java:653) at java.util.ArrayList.get(ArrayList.java:429) at NewClass2.main(NewClass2.java:7)

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    4 times, 2 months ago
    Once, 7 months ago
    Unknown user
    Once, 1 month ago
    Unknown user
    Once, 11 months ago
    Once, 1 year ago
    240 more bugmates