Hi,
Let say I hava a value 245.678909. I want to display it as 245.68. It is a double value. What should I do?
Thank you.
:confused:
Printable View
Hi,
Let say I hava a value 245.678909. I want to display it as 245.68. It is a double value. What should I do?
Thank you.
:confused:
Make a java.text.DecimalFormat like:
static DecimalFormat df=new DecimalFormat("0.00");
use it like
System.out.println(df.format(aDoubleValue));
It will do the rounding for you.