Java BigInteger sqrt() method7 Jan 2025 | 1 min read The sqrt() method of Java BigInteger class is used to find the square root of a BigInteger value. Syntax:Parameter:NA Returns:This method returns the integer square root of this BigInteger value. Exception:ArithmeticException - This exception will throw if this BigInteger is negative. Example 1Output: Square root of BigInteger 625 is 25 Example 2Output: Square root of BigInteger 1000 is 31 Example 3Output: Exception in thread "main" java.lang.ArithmeticException: Negative BigInteger at java.base/java.math.BigInteger.sqrt(Unknown Source) at BigIntegerSqrtExample3.main(BigIntegerSqrtExample3.java:9) Next TopicJava Boolean class |
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