Skip to content
Advertisement

Tag: biginteger

Converting from Integer, to BigInteger

I was wondering if there was any way to convert a variable of type Integer, to BigInteger. I tried typecasting the Integer variable, but i get an error that says inconvertible type. Answer The method you want is BigInteger#valueOf(long val). E.g., Making a String first is unnecessary and undesired.

Advertisement