Javatpoint Logo
Javatpoint Logo

Java Double intValue() method

The intValue() method of Java Double class returns the value of this Double as an int by narrowing the primitive values or by casting to type int.

Syntax

Parameters

NA

Return value

The intValue() method returns the double value which has been converted to type int.

Example 1

Test it Now

Output:

Enter your double value number
678.789
Int value of 678.789 = 678

Example 2

Test it Now

Output:

Enter two number
23.8
0.98
Multiplication of decimal no = 23.324
Multiplication integer values = 0

Next TopicJava Double





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