Java BigInteger andNot() MethodThe andNot() method of Java BigInteger classreturns the bitwise AND of this BigInteger and the bitwise negation of the given BigInteger as a new BigInteger. Calling this method is equivalent to calling and (val.not()). Syntax:Parameter:val - Value to be complemented and AND'ed with this BigInteger. Returns:This method returns a BigInteger object of value, this & ~val. Note:This method returns a negative BigInteger if and only if this is negative and val is positive.Example 1Test it NowOutput: Result of andNot operation is 3 Example 2Test it NowOutput: Result of andNot operation is -7 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