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
|