Computer Science, asked by HARIHANDSOME, 11 months ago

When does the ArrayIndexOutOfBoundsException occur? *​

Answers

Answered by rajeswariraja720
15

Explanation:

ArrayIndexOutOfBoundsException occurs when the index is either negative or greater than or equal to the size of the array.

Answered by Agastya0606
0

ArrayIndexOutOfBoundsException occurs when the index is either negative or greater than or equal to the size of the array.

  • Additionally, certain checking happens at runtime. So, ArrayIndexOutOfBoundsException could be a runtime exception.
  • Therefore, we want to be additional careful once accessing the boundary parts of the associate array. the foremost common mistake which will happen when accessing an associate array is forgetting the higher and lower bounds.
  • The edge of the associate array is often zero, whereas the edge is one but its length. Accessing the array parts out of those bounds would throw associate ArrayIndexOutOfBoundsException.

#SPJ2

Similar questions