What is an “index out of range” exception, and how do I fix it? [duplicate]
Why does this error occur? Because you tried to access an element in a collection, using a numeric index that exceeds the collection’s boundaries. The first element in a collection is generally located at index 0. The last element is at index n-1, where n is the Size of the collection (the number of elements … Read more