Javatpoint Logo
Javatpoint Logo

Java Array setChar() Method

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

Syntax

Parameter

array - the array

index - the index into the array

c - the new value of the indexed component

Returns

Does not return any value.

Throws

NullPointerException

IllegalArgumentException

ArrayIndexOutOfBoundsException -

NegativeArraySizeException

Example 1

Test it Now

Output:

Value :: A

Example 2

Test it Now

Output:

JAVA
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