The shortValue() method of Java Integer class returns a short value for this Integer after a narrowing primitive conversion.

Syntax

public short shortValue ()

Parameters

NA

Overrrides:

The shortValue () overrides :

shortValue in class Number 

Return Value

This method returns the numeric value represented by this object after conversion to type short.

Example 1

Output

Example 2

Output

Example 3

Output

Pin It on Pinterest

Share This