Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

formating numeric display..

 
Rajeev Ravindran
Ranch Hand
Posts: 455
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi all,
is it possible to format the decimal display of numeric values ?? i mean, i want 1 to be displayed as 001 and 2 as 002, like that 10 will be displayed as 010 .... i hope my question is clear !!
thanks,
raj
 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I love visiting this board because it makes me go out and learn stuff. Try this:

There are a number of formatters in the JDK. Look at classes derived from Format.
 
Rajeev Ravindran
Ranch Hand
Posts: 455
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi stan,
thanks for ur reply..that is wat i was looking for..Im too lazy to go thru the API..lol..
Thanks,
raj
 
Gaurav Mac Mathur
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic