 |
 |
 |
 |
 |
 |
 |
 |
 |
| • |
Array
indexes can be any integral expression of type
|
|
|
char, short, byte, or int
|
|
|
| • |
It is
the programmer’s
responsibility to make sure that an
|
|
|
|
array
index does not go out of bounds.
The index must
|
|
|
|
be
within the range 0 through the array’s length minus 1
|
|
|
| • |
Using
an index value outside this range throws an
|
|
|
ArrayIndexOutOfBoundsException; prevent this
|
|
error
by using public instance variable length
|
|