It should be IndexOutOfBoundsException. But as this exception is a runtime exception it is ok if you don't catch it. The better solution is to check the size of your array list before you try to read data at the speficied index.

StringIndexOutOfBoundsException is subclass of IndexOutOfBoundsException. So I believe that my catch will catch both Exceptions. Is this right?

I think it actually has to be IndexOutOfBoundsException that needs to be caught. Because, if you were to put Exception e instead, it catches any type of Exception. So, its the same case here, the superclass is the one that needs to be caught. Correct me if I'm wrong.