Check out example codes for "java array out of bounds". It will help you in understanding the concepts better.

Code Example 1

//Use index inside the bounds of the array

Learn ReactJs, React Native from akashmittal.com