Java Array set() MethodThe set() method of Array class returns the value of the indexed component in the specified array object, as a short. SyntaxParameterarray - the array index - the index into the array value - the new value of the indexed component ReturnsDoes not return any value. ThrowNullPointerException IllegalArgumentException ArrayIndexOutOfBoundsException - Example 1Test it NowOutput: Before Setting : JavaTPoint After Setting : JavaforPoint Example 2Test it NowOutput: obj:3 Array :: [1, 2, 1] Next TopicJava Array Class |
We provides tutorials and interview questions of all technology like java tutorial, android, java frameworks
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India