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