- import java.math.BigInteger;
- public class Test {
- /**
- * @param args
- */
- public static void main(String[] args) {
- // TODO Auto-generated method stub
- BigInteger one = new BigInteger("1");
- BigInteger two = new BigInteger("2");
- BigInteger three = new BigInteger("3");
- BigInteger sum = new BigInteger("0");
-
- sum = sum.add(one);
- sum = sum.add(two);
- sum = sum.add(three);
-
- System.out.println(sum.toString());
-
-
- }
-
- }
复制代码 哥们,你应该改成这样,你没把返回的值赋给sum啊 |