Java BigInteger signum() methodThe signum() method of Java BigInteger class is used to check whether a BigInteger value is positive, negative or zero. This method returns one of the following values depending on the following conditions :
Syntax:Parameter:NA Returns:The method returns 1, 0 or -1 as the value of this BigInteger when they are positive, zero or negative respectively. Exception:NA Example 1Test it NowOutput: For 10, Signum function returns 1 Example 2Test it NowOutput: For -10, Signum function returns -1 Example 3Test it NowOutput: For 0, Signum function returns 0 Next TopicJava BigInteger |
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