public void and(BitSet set)
public void or(BitSet set)
public void xor(BitSet set)
public void andNot(BitSet set)
import java.util.BitSet;
public class MainClass {
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.and(bites);
System.out.println(bites);
bites.or(bites);
System.out.println(bites);
bites.xor(bites);
System.out.println(bites);
bites.andNot(bites);
System.out.println(bites);
}
}
{0, 1, 2, 3}
{0, 1, 2, 3}
{}