Re: Printing number with leading space instead of zero or nothing?



Johannes Beekhuizen wrote:
Hallo,

I like to show a number as e.g. " 8" instead of "8" or "08". I looked at text.DecimalFormat, but did not find a way to do it.
Is there a way exceopt using an if-statement?


Groetjes,

           Hans.


Take a look at printf, added to Java 1.5/5.0.

Pan
--
TechBookReport Java book reviews:
http://www.techbookreport.com/JavaIndex.html
.