89
Java Array getDouble() Method
The getDouble() method of Array class returns the value of the indexed component in the specified array object, as a double.
Syntax
Parameter
array – the array
index – the index
Returns
the value of the indexed component in the specified array
Throws
NullPointerException
IllegalArgumentException
ArrayIndexOutOfBoundsException –
Example 1
Output:
1.9 , 2.7 , 3.9 ,
Example 2
Output:
2.2
Next TopicJava Array Class