Java Number doubleValue() MethodThe doubleValue() is a method of Java Number class which returns the value of the specified number casted as a double equivalent. This method may also involve in rounding or truncation. Syntax:Following is the declaration of doubleValue() method: Parameter:
Returns:The doubleValue() method returns the numeric value represented by this object after conversion to type double. Exceptions:NA Compatibility Version:Java 1.0 and above Example 1Test it NowOutput: x as integer : 123456 x as double: 123456.0 Example 2Output: Enter the Desired Value : 987654321 Double Value is: 9.87654321E8 Example 3Test it NowOutput: 1.234567898E9 9.34545856E8 53454.43654 7.3454587659675456E16 Next TopicJava Number Class |
We provides tutorials and interview questions of all technology like java tutorial, android, java frameworks
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India