BitSet implements Serializable, Cloneable { void clear(int index) { bits[index >>> 6] &= ~(1L << (index & 0x3F)); } BitSet(int numBits); private  BitSet(long[] bits); @Override BitSet clone(); @Override String toString();  }
@Test public void testClear() { BitSet bitSet = new BitSet(NUM_BITS); for (int i = 0; i < NUM_BITS; i++) { bitSet.set(i); } for (int i = 0; i < NUM_BITS; i++) { assertTrue(bitSet.get(i)); } bitSet.clear(); for (int i = 0; i < NUM_BITS; i++) { assertFalse(bitSet.get(i)); } }