Javatpoint Logo
Javatpoint Logo

Java Number intValue() Method

The intValue() is a method of Java Number class which automatically returns the value of the specified number as an int.

Syntax:

Following is the declaration of intValue() method-

Parameter:

DataType Parameter Description
NA NA This method does not accept any parameter.

Returns:

The intValue() method returns the numeric value represented by this object after conversion to type int.

Exceptions:

NA

Compatibility Version:

Java 1.0 and above

Example 1

Test it Now

Output:

 Output Value is: 25

Example 2

Test it Now

Output:

Value of X: 568
Value of Y: 55

Example 3

Test it Now

Output:

Value is = 13

Next TopicJava Number Class





Youtube For Videos Join Our Youtube Channel: Join Now

Feedback


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA