Online Java Compiler By
JavaTpoint.com
import java.math.BigInteger; public class BigIntegerDoubleValueExample { public static void main(String[] args){ // create 2 BigIntegerobjects BigInteger big1,big2; // create 2 Doubleobjects Double double1,double2; big1= new BigInteger("111"); big2= new BigInteger("22222222"); // assign double value of big1,big2 to double1 ,double2 double1= big1.doubleValue(); double2= big2.doubleValue(); String str1= "Result of doubleValueoperaion on " +big1+ " is " + double1; String str2= "Result of doubleValueoperaion on " +big2+ " is " + double2; // print double1,double2 values System.out.println(str1); System.out.println(str2); } }
Output