Java Integer longValue() method

tutorial and example
tutorial and example

The longValue()  method of Java Integer class returns a long value for this Integer after a widening primitive conversion.

Syntax

public long longValue()

Parameters

NA

Specified by

This method is specified by longValue in class Number

Return Value

This method returns the numeric value of this object after conversion to type long.

Example 1

Output

Example 2

Output

Example 3

Output