0
what happens when your program attempts to access an array element with an invalid index?
3 Respostas
+ 10
A run time exception (ArrayOutOfBoundsException) will occur when any Java program will try to access an invalid index of an array i.e negative index or index higher than the size of the array.
Example :
https://code.sololearn.com/cTL559W6UgmV/?ref=app
+ 8
Each dimension in an array has an upper and lower bound, which determine the range of values that can be used as subscripts for that dimension.
Lower bound will be the minimum index value while the upper bound will be the maximum index value.
+ 1
What means by bound in java?