Home » Java Array setDouble() Method

Java Array setDouble() Method

by Online Tutorials Library

Java Array setDouble() Method

The setDouble() method of Array class is used to set the value of the indexed component of the specified array object to the specified double value.

Syntax

Parameter

array – the array

index – the index into the array

d – the new value of the indexed component

Returns

Does not return any value.

Throw

NullPointerException

IllegalArgumentException

ArrayIndexOutOfBoundsException –

Example 1

Test it Now

Output:

2.4  , 7.4  , 9.4    

Example 2

Test it Now

Output:

8.0  9.0  10.0  
Next TopicJava Array Class

You may also like