Online Java Compiler By
JavaTpoint.com
import java.math.BigInteger; public class BigIntegerClearBitExample1 { public static void main(String[] args){ // create 2BigInteger objects BigInteger big1,big2; // assign value to big1 big1= new BigInteger("15"); // 1111 // perform clearBit operation on big1 with index 2 big2 = big1.clearBit(2);// 1011 after clearing the bit on index 2 String str="Result of clearBit operation on "+big1+ " is " + big2; System.out.println(str); } }
Output