Lets see how to convert the int value to BigInteger in java.
Class name: IntToBiginteger.java
import java.util.*;
import java.math.BigInteger;
public class IntToBiginteger{
public static void main(String[] args){
BigInteger result = BigInteger.valueOf(5);
System.out.println("Big int value is: " + result);
}
}
OUTPUT:
Big int value is: 5
Class name: IntToBiginteger.java
import java.util.*;
import java.math.BigInteger;
public class IntToBiginteger{
public static void main(String[] args){
BigInteger result = BigInteger.valueOf(5);
System.out.println("Big int value is: " + result);
}
}
OUTPUT:
Big int value is: 5
No comments:
Post a Comment