Privacy Policy Terms Of Use. Copyright © 2006-2010 Java Tutorials and Examples.
Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.
Individual elements of an array can be accessed by specifying index with [] operator, with the following syntax.
arrayName[<index>]
Here index can be any expression, which evaluates to non negative int value. Array index always starts at 0 and ends at arrayName.length – 1. Array index is automatically checked to ensure that it is well within the bounds. If index is less than 0 or grater than arrayName.length, an ArrayIndexOutOfBoundException is thrown.
Note: [] operator is not used when manipulating the array reference. For example, when array reference is passed to another method.
<< Array Initialization Multidimensional Array >>

Post new comment