Javatpoint Logo
Javatpoint Logo

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





Youtube For Videos Join Our Youtube Channel: Join Now

Feedback


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA