会员
周边
众包
新闻
博问
闪存
所有博客
当前博客
我的博客
我的园子
账号设置
简洁模式
...
退出登录
注册
登录
shine_panda
博客园
首页
新随笔
管理
订阅
java如何对两个超大数相加
public
class
Test
...
{
public
static
void
main(String[] args)
...
{
String a
=
"
123456789123456789
"
;
String b
=
"
123456789123456789
"
;
java.math.BigInteger a2
=
new
java.math.BigInteger(a);
java.math.BigInteger b2
=
new
java.math.BigInteger(b);
java.math.BigInteger result
=
a2.add(b2);
System.out.println (result );
}
}
posted @
2008-04-20 07:57
shine_panda
阅读(
3105
) 评论(
0
)
编辑
收藏
举报
会员力量,点亮园子希望
刷新页面
返回顶部