Home » Java Array get() Method

Java Array get() Method

by Online Tutorials Library

Java Array get() Method

The get() method of Array class returns the value of the indexed component in the specified array object. If it has a primitive type. The value is automatically wrapped in an object.

Syntax

Parameter

array – the array

index – the index

Returns

value of the indexed component in the specified array

Throws

NullPointerException

IllegalArgumentException

ArrayIndexOutOfBoundsException

Example 1

;i++)>

You may also like