111
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
Output:
Value :: A
Example 2
Output:
JAVA
Next TopicJava Array Class