Home » Java Short longValue() method with Examples

Java Short longValue() method with Examples

by Online Tutorials Library

Java Short longValue() Method

The longValue() method of Java Short class returns long type value of Short object by widening primitive conversion.

Syntax

Parameters

N/A

Return value

long type numeric value corresponding to Short.

Example 1

Test it Now

Output:

Short 100 converted into longValue is = 100  

Example 2

Test it Now

Output:

Short -500 converted into longValue is = -500 

Next TopicJava Short

You may also like