The index
provided should be greater than zero and should be less than ArrayList size.
at : ArrayList: Inserting and Retrieving Elements Educative: Interactive Courses for Software Developers
correction: the index can be 0. (0…n-1, the same way as in normal arrays)