71
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
Output:
Enter your double value number 678.789 Int value of 678.789 = 678
Example 2
Output:
Enter two number 23.8 0.98 Multiplication of decimal no = 23.324 Multiplication integer values = 0
Next TopicJava Double