posted 13 years ago
Don't confuse how you store the data with how you display the data. The two concepts are independent. I don't think I would choose BigDecimal to store numbers which are restricted to being integers between 0 and 999; for one thing you aren't using anything after the decimal point so BigInteger would be more reasonable, and you aren't storing "big" integers so a plain old "int" value would be just fine.
As for displaying those values with leading zeroes, consider using a suitably-configured DecimalFormat object.