Express number as 01, 02

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • z666
    New Member
    • Jan 2008
    • 1

    Express number as 01, 02

    I have a requirement where I have to express a number like '01' and '02' and it should be numeric.

    Any suggession.
  • JosAH
    Recognized Expert MVP
    • Mar 2007
    • 11453

    #2
    Originally posted by z666
    I have a requirement where I have to express a number like '01' and '02' and it should be numeric.

    Any suggession.
    And how are you supposed to express numbers such as 10, 11, 12 ... ?
    Should they be expressed as 010, 011, 012?

    kind regards,

    Jos

    Comment

    • BigDaddyLH
      Recognized Expert Top Contributor
      • Dec 2007
      • 1216

      #3
      See PrintWriter.for mat. PrintStream has the same format methods.
      The source of this formatting is class java.util.Forma tter

      Comment

      Working...