Online Java Compiler By
JavaTpoint.com
import java.math.BigInteger; public class BigIntegerXorExample1{ public static void main (String[] args) { // create 3 BigInteger object BigInteger big1, big2, big3; // assign value to big1and big2 big1= new BigInteger("5"); big2= new BigInteger("2"); // perform xor operation on big1 and big2 big3= big1.xor(big2); String str = "XOR operation on " + big1+ " and " + big2+" gives "+big3; System.out.println(str); } }
Output