Javatpoint Logo
Javatpoint Logo

Java Integer doubleValue() method

The 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.

Syntax

Following is the declaration of doubleValue() method:

Parameter:

DataType Parameter Description
NA NA This method does not accepts any 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 1

Test it Now

Output:

Double value of the object is = 23.45
Double value of the object is = 55.0

Example 2

Output:

Enter the Desired Value : 45654
Double Value is: 45654.0

Example 3

Output:

Enter the Integer Value : 5745
X = 5745.0
Y = 6.4543736E7

Example 4

Test it Now

Output:

The first object in double is = 452.0
The second object in double is = 1.23233243564578E14

Next Topicequals() Method





Youtube For Videos Join Our Youtube Channel: Join Now

Feedback


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA