scala

scala> java.lang.String.format("%03d", 1)
<console>:6: error: type mismatch;
 found   : Int
 required: java.lang.Object
Note: primitive types are not implicitly converted to AnyRef.
You can safely force boxing by casting x.asInstanceOf[AnyRef].
       java.lang.String.format("%3d", 1)
                              ^
scala> java.lang.String.format("%03d", 1.asInstanceOf[Object])
res2: java.lang.String = 001

これはうれしくないなぁ〜。