Scala FAQ: How can I format numbers and currency in Scala, ... Pi pi: Double = 3.141592653589793 scala> println(f"$pi%1.5f") 3.14159.
確定! 回上一頁