Home » Java Array getShort() Method

Java Array getShort() Method

by Online Tutorials Library

Java Array getShort() Method

The getShort() method of Array class returns the value of the indexed component in the specified array object, as a short.

Syntax

Parameter

array – the array

index – the index

Returns

the value of the indexed component in the specified array

Throw

NullPointerException

IllegalArgumentException

ArrayIndexOutOfBoundsException –

Example 1

Test it Now

Output:

190  , 98  , 45  

Example 2

Test it Now

Output:

54  
Next TopicJava Array Class

You may also like