Javatpoint Logo
Javatpoint Logo

Java Convert double to int

We can convert double to int in java using typecasting. To convert double data type into int, we need to perform typecasting.

Java Convert double to int

Typecasting in java is performed through typecast operator (datatype).

Here, we are going to learn how to convert double primitive type into int and Double object into int.

Java double to int Example: Typecasting

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

Test it Now

Output:

10

Java Double to int Example: intValue() method

We can convert Double object to int by intValue() method of Double class. Let's see the simple code to convert Double to int in java.

Test it Now

Output:

10
Next TopicJava char to int





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