java big integer to int
yourInt = yourBigInteger.intValue();
java big integer to int
yourInt = yourBigInteger.intValue();
transformer un string en Biginteger java
package com.mkyong;
import java.math.BigInteger;
public class JavaExample {
public static void main(String[] args) {
int n = 100;
System.out.println(n);
// convert int to Integer
Integer integer = Integer.valueOf(n);
System.out.println(integer);
// convert int to BigInteger
BigInteger bigInteger = BigInteger.valueOf(n);
System.out.println(bigInteger);
// convert Integer to BigInteger
//BigInteger bigInteger2 = BigInteger.valueOf(integer); // works
BigInteger bigInteger2 = BigInteger.valueOf(integer.intValue());
System.out.println(bigInteger2);
}
}
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us