Java BigDecimal intValueExact() Method20 Mar 2025 | 2 min read The intValueExact() method of java BigDecimal class is used to Convert a BigDecimal to an int type as well as this method also check for the lost information. Syntax:Parameter:No Exception:If this has a non-zero fractional part, or will not fit in an int, then it throws an ArithmeticException. Returns:It returns int value from BigDecimal. Example 1Output: Returned Exact Integer Value of 17674137 is = 17674137 Example 2Output: Returned Exact Integer Value of -623341 is = -623341 Example 3Output: ArithmeticException Example 4Output: ArithmeticException Next TopicJava BigDecimal |
We request you to subscribe our newsletter for upcoming updates.

We provides tutorials and interview questions of all technology like java tutorial, android, java frameworks
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India