Search:

Type: Posts; User: Norm

Search: Search took 0.11 seconds.

  1. Re: ArrayList initial capacity problem (Index out of bounds Exception)

    The class you are using does not support that. It doesn't like empty slots.
    If you use an array not an ArrayList, you can add items anywhere you want.
  2. Re: ArrayList initial capacity problem (Index out of bounds Exception)

    You need to read the API doc for the ArrayList's add method. It lists the exceptions that can be thrown and gives the reasons they are thrown. Your case is described there on the last line.
Results 1 to 2 of 2