View Single Post
  #2 (permalink)  
Old 12-30-2007, 05:09 PM
wsaryada wsaryada is offline
Senior Member
 
Join Date: Jun 2007
Location: Bali, ID
Posts: 102
wsaryada is on a distinguished road
It could also be done using the Formatter class:

Code:
System.out.printf("Number = %03d", 3); String number = String.format("%03d", 3); System.out.println("Number = " + number);
__________________
Website:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
- Blog:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Reply With Quote