Online Java Compiler By
JavaTpoint.com
import java.math.BigInteger; public class BigIntegerAndNotExample2{ public static void main(String[] args){ // create 3 BigInteger objects BigInteger big1, big2 , big3; // assign values to big1, big2 big1= new BigInteger("-7"); // 1000 big2 =new BigInteger("4"); // 0100 //perform andNot operation on big1 using big2 big3= big1.andNot(big2); //1000 String str="Result of andNot operation is "+ big3; System.out.println(str); //print big3 value } }
Output