bigInteger to int code example
Example 1: java long to int
public class LongToIntExample2{
public static void main(String args[]){
Long l= new Long(10);
int i=l.intValue();
System.out.println(i);
}
}
Example 2: java int to biginteger
int myInt = 10
BigInteger bigInt = BigInteger.valueOf(myInt);
Integer integer = Integer.valueOf(myInt);
BigInteger bigInt = BigInteger.valueOf(myInteger.intValue());
bigInt = BigInteger.valueOf(myInteger);
Example 3: java long to integer
Integer i = (int) (long) theLong;