java.lang.IndexOutOfBoundsException

Index: 20, Size: 4

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 web6640

  • via Coderanch by charlie mills, 9 months ago
    Index: 20, Size: 4
  • Index: 20, Size: 20
  • Index: 20, Size: 20
  • Stack trace

    • java.lang.IndexOutOfBoundsException: Index: 20, Size: 4 at java.util.ArrayList.RangeCheck(ArrayList.java:547) at java.util.ArrayList.get(ArrayList.java:322) at CitiesAndTemperatures.controlMenu(CitiesTempsAppApp.java:144) at CitiesAndTemperatures.main(CitiesTempsAppApp.java:175)

    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

    Unknown user
    Once, 11 months ago
    Unknown user
    Once, 1 year ago
    Unknown user
    Once, 1 year ago
    Unknown user
    Once, 1 year ago
    Unknown user
    Once, 1 year ago
    229 more bugmates