val s:BigInt = 3333333333333333 为什么编译出错,不是说scala中,会自动把超长的整数变为BigInt吗?
在stackoverflow上有人提了这个问题,也有回答:
http://stackoverflow.com/questions/1689414/java-scala-biginteger-pasting
简单点说,就是如果在编码中手动写一个超长的int,还是要用java中的方式:
val s:BigInt = BigInt(“3333333333333333333333333”)```