Java BigInteger negate() MethodThe negate() method of Java BigInteger class returns a new BigInteger that is identical to this BigInteger except that its sign is reversed. Syntax:Returns:This method returns a BigInteger whose value is (-this). Parameter:NA Exception:NA Example 1Test it NowOutput: Negated value of 1000 is -1000 Example 2Test it NowOutput: Negated value of -123 is 123 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