Table of Content

How to perform logical andNot operation on BitSet in Java ?


Declaration :

Explanation :

Purpose The andNot(BitSet set) method clears all of the bits in this BitSet whose corresponding bit is set in the specified BitSet.
Parameters set ===> the BitSet with which to mask this BitSet.
Return Value This method does not return a value.
Exception NA

Java Program : Example

Below example will explain java.util.BitSet.andNot() method.

Output of Program :