Scala 2.9 中的标准十进制类型是什么?
Scala 与 C# 的 decimal
的相似之处是什么?我应该使用 java.math.BigDecimal 还是 Scala 中有自己的标准类型?
What is the Scala's analogue to C#'s decimal
? Should I use java.math.BigDecimal or is there own standard type for this in Scala?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
有
scala.math。 BigDecimal
已在Predef
中导入。这只是java.math.BigDecimal
的包装,它使用方法的运算符名称(例如+
而不是add
)。There is
scala.math.BigDecimal
which is already imported inPredef
. This is only a wrapper aroundjava.math.BigDecimal
that uses operator names for methods (like e.g.+
instead ofadd
).