Open In App

Array set() method in Java

The java.lang.reflect.Array.set() is an inbuilt method in Java and is used to set a specified value to a specified index of a given object array.

Syntax



Array.set(Object []array, int index, Object value)

Parameter :

Return type : This is a void type method this doesn’t returns any value. The update reflects upon the Object array passed as the argument.



Exception : This method throws following exception.

Article Tags :