java - Give the number digits -
i have problem:
i declare number format here example:
i have number 45.23463 , convert this:
0045.23463000000
after dots ok couse string.format("%.8f",variable); before dot?
thx afruther help
use decimalformat instance, 0 character every spot must show digit, if it's leading/trailing zero.
decimalformat df = new decimalformat("0000.00000000000"); then call format format number.
the javadocs decimalformat contain list of formatting symbols can use here.
Comments
Post a Comment