Online Java Compiler By
JavaTpoint.com
import java.math.BigInteger; public class BigIntegerAndExample2 { public static void main(String[] args){ BigInteger big1, big2, big3; // create 3 BigInteger objects big1=new BigInteger ("-5"); //1011 in binary big2=new BigInteger ("-3"); //1101 in binary big3=big1.and (big2); // 1111 in binary String str = "Result is" + big3; System.out.println ( str ); //print big3 value } }
Output