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 1Test it NowOutput: 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 4Test it NowOutput: The first object in double is = 452.0 The second object in double is = 1.23233243564578E14
Next Topicequals() Method
|