Java Integer doubleValue() methodThe doubleValue() method is a static method of Integer class under java.lang package. This method returns the value of this Integer as a double equivalent. This method is specified by Number class and may involve rounding or truncation. SyntaxFollowing 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.2 and above Example 1Output: Double value of the object is = 23.45 Double value of the object is = 55.0 Example 2Output: Enter the Desired Value : 45654 Double Value is: 45654.0 Example 3Output: Enter the Integer Value : 5745 X = 5745.0 Y = 6.4543736E7 Example 4Output: The first object in double is = 452.0 The second object in double is = 1.23233243564578E14 Next TopicJava-integer-equals-method |
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