Java BigInteger divide() method20 Mar 2025 | 1 min read The divide() method of Java BigInteger class is used to divide two BigInteger values.This method returns a BigInteger whose value is (this / val). Syntax:Returns:This method returns a BigInteger whose value is (this / val) Throws:ArithmeticException- if val is zero. Note: Since the result would be BigInteger and would not be able to hold fractions then the remainder would be discarded.Example 1Output: Result of divideoperation is-22 Example 2Output: Result of divideoperation is 22 Example 3Output: java.lang.ArithmeticException: BigInteger divide by zero Next TopicJava BigInteger |
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