89
Java Array getLength() Method
The getLength() method of Array class returns the length of the specified array object, as an int.
Syntax
Parameter
array – the array
index – the index
Returns
the length of the array
Throw
IllegalArgumentException
Example 1
Output:
890 980 [890, 980]
Example 2
Output:
Array length :: 2
Next TopicJava Array Class