DEV Community

Discussion on: Java ArrayList Index Out of Range: Need Quick Fix

Collapse
 
leoboladox profile image
Leonardo Bonifacio Neves

Hi Sam, the answer:
Arrays in Java are zero-indexed, which means that the first element in an array has an index of 0, the second element has an index of 1, and so on

Reference: freecodecamp.org/news/how-to-creat....