BigInteger.TEN
static BigInteger TEN
- The BigInteger constant ten.
import java.math.BigInteger;
public class Main {
public static void main(String[] args) {
BigInteger numberA = new BigInteger("98765432123456789");
BigInteger numberB = BigInteger.TEN;
numberA = numberA.add(numberB);
System.out.println("numberA = " + numberA);
numberA = numberA.multiply(numberB);
System.out.println("numberA = " + numberA);
numberA = numberA.subtract(numberB);
System.out.println("numberA = " + numberA);
numberA = numberA.divide(numberB);
System.out.println("numberA = " + numberA);
numberA = numberA.mod(numberB);
System.out.println("numberA = " + numberA);
numberA = numberA.pow(2);
System.out.println("numberA = " + numberA);
numberA = numberA.negate();
System.out.println("numberA = " + numberA);
}
}
Home
Java Book
Essential Classes
Java Book
Essential Classes
BigInteger:
- BigInteger class
- BigInteger.TEN
- BigInteger.ZERO
- Constructor
- BigInteger: add(BigInteger val)
- BigInteger: andNot(BigInteger val)
- BigInteger: bitLength()
- BigInteger: clearBit(int n)
- BigInteger: divide(BigInteger val)
- BigInteger: doubleValue()
- BigInteger: flipBit(int n)
- BigInteger: isProbablePrime(int certainty)
- BigInteger: modPow(BigInteger exponent, BigInteger m)
- BigInteger: multiply(BigInteger val)
- BigInteger: negate()
- BigInteger: not()
- BigInteger: or(BigInteger val)
- BigInteger: probablePrime(int bitLength, Random rnd)
- BigInteger: pow(int exponent)
- BigInteger: setBit(int n)
- BigInteger: shiftLeft(int n)
- BigInteger: shiftRight(int n)
- BigInteger: subtract(BigInteger val)
- BigInteger: testBit(int n)
- BigInteger: toByteArray()
- BigInteger: toString()
- BigInteger: toString(int radix)
- BigInteger: valueOf(long val)
- BigInteger: xor(BigInteger val)