BitSet: andNot(BitSet set)
void andNot(BitSet set)
- Clears all of the bits whose corresponding bit is set in the specified BitSet.
import java.util.BitSet;
public class Main {
public static void main (String args[]) {
BitSet bites = new BitSet();
bites.set(0);
bites.set(1);
bites.set(2);
bites.set(3);
System.out.println(bites);
bites.andNot(bites);
System.out.println(bites);
}
}