Home » Java Double intValue() Method with Examples

Java Double intValue() Method with Examples

by Online Tutorials Library

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

You may also like