Java -. , . Java , , .
, – , . BigInteger. Java Java, . .
BigInteger Java:
, BigInteger . , , valueOf. . , , BigInteger Java valueOf.
Java , , . .
Java BigInteger:
, . .
, :
- add(value) – , ;
- subtract(subtractor) – subtractor ;
- multiply(value) – ;
- divide(divider) – divider;
- pow(int arg) – , arg;
- abs() – ;
- negate() – BigInteger, .
:
- BigInteger val1, val2, adding, dividing, oppositeSign;
- val1 = new BigInteger(“5”);
- val2 = BigInteger.valueOf(10);
- adding = val1.add(val2);
- dividing = val2.divide(val1);
- oppositeSign = val1.negate();
. val1 , , 5. val2 10 valueOf. adding 15. dividing . oppositeSign val1 , . . -5.
, BigInteger Java . , Java , .