java - scala给BigInt赋初值失败?
巴扎黑
巴扎黑 2017-04-18 10:38:33
0
1
551
巴扎黑
巴扎黑

reply all(1)
左手右手慢动作

The problem is not with BigInt, but with the literal on the right that cannot be evaluated.

scala> 1881676371789154860897069000
<console>:1: error: integer number too large
1881676371789154860897069000

BigInt can be initialized with string

scala> BigInt("12345667890087234578023089723457234705892375071881676371789154860897069000")
res0: scala.math.BigInt = 12345667890087234578023089723457234705892375071881676371789154860897069000
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template