Search found 1 match

by barakmitz
Sat Nov 22, 2008 12:12 pm
Forum: Java
Topic: How to I disply only 3 numbers after dot of double?
Replies: 3
Views: 4853

How to I disply only 3 numbers after dot of double?

Hi,
I want to sidply Double variables but I want it always to be 3 numbers after the dot
Example:
4 ---> 4.000
1642.63787565 ----> 1642.638

and so on
how can i do this?
I heard something about printf but im not sure how to use it or if it works...

Thanks

Go to advanced search