Java BigInteger

 

 1 import java.math.BigInteger;
 2 
 3 public class SwitchTest {
 4     public static void main(String[] args) {
 5         BigInteger n=new BigInteger("4125444444444444444444444444");
 6         BigInteger n1=new BigInteger ("45111111111111111111111111");
 7         System.out.println(n.add(n1));
 8         System.out.println(n.subtract(n1));
 9         System.out.println(n.multiply(n1));
10         System.out.println(n.divide(n1));
11     }
12 }

 

 

posted on 2014-10-28 09:19  @冰糖  阅读(145)  评论(0编辑  收藏  举报

导航