Javatpoint Logo
Javatpoint Logo

Java BigDecimal intValue() method

The hashCode() method of java BigDecimal class is used to Convert a BigDecimal to an int type value.

Note: This conversion can lose information about the overall magnitude and precision of this BigDecimal value as well as return a result with the opposite sign.

Syntax:

Parameter:

No

Exception:

No

Returns:

It returns int value of BigDecimal.

Example 1

Test it Now

Output:

Returned int value is = 3545

Example 2

Test it Now

Output:

Returned int value is = -36755

Example 3

Test it Now

Output:

Returned int value is = -1011088953

Example 4

Test it Now

Output:

Returned int value is = 3283878

Next TopicJava BigDecimal





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