Convert 1 to 01

前端 未结 11 1460
逝去的感伤
逝去的感伤 2021-02-07 04:09

I have an int between 1 - 99. How do I get it to always be a double digit, ie: 01, 04, 21?

11条回答
  •  误落风尘
    2021-02-07 04:58

    use number format http://download.oracle.com/javase/6/docs/api/java/text/NumberFormat.html

提交回复
热议问题