Home » Java Convert int to double

Java Convert int to double

by Online Tutorials Library

Java Convert int to double

We can convert int to double in java using assignment operator. There is nothing to do extra because lower type can be converted to higher type implicitly.

Java Convert int to double

It is also known as implicit type casting or type promotion.

Java int to double Example

Let’s see the simple code to convert int to double in java.

Test it Now

Output:

200.0 

Java int to Double Example

We can convert int value to Double object by instantiating Double class or calling Double.valueOf() method.

Let's see the simple code to convert int to Double in java.

Test it Now

Output:

100.0 100.0 
Next TopicJava double to int

You may also like