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