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

Popular posts from this blog

python - How to create a legend for 3D bar in matplotlib? -

java - Multi-Label Document Classification -

php - Dynamic url re-writing using htaccess -