package com.candidjava;
import java.util.BitSet;
/**
* @author :vinod kumar v
* @description :TheB itSet.clear(int fromIndex,int toIndex) method sets the
* bits from the specified fromIndex (inclusive) to the specified
* toIndex (exclusive) to false.
* */
public final class BitSetClear {
public static void main(String[] args) {
BitSet obj = new BitSet(8);
BitSet obj1 = new BitSet(8);
obj.set(0);
obj.set(1);
obj.set(2);
obj.set(3);
obj1.set(2);
obj1.set(4);
obj1.set(6);
obj1.set(8);
System.out.println("The Value in obj:" + obj);
System.out.println("The Value in obj1" + obj1);
obj.clear(1, 3);
obj1.clear(2, 6);
System.out.println("The Value in obj:" + obj);
System.out.println("The Value in obj1" + obj1);
}
}