How to control the decimal values ?
Hi
I want to control the decimals over the Math.round function. I used the following statement
class Ts
{
publicstaticvoid main(String args[])
{
double x=0.0;
double y=0.0D;
double z=0.0;
x=16094.712;
y=18.123;
z=x+y;
z= Math.round(z);
System.out.println("x"+z);
}
}
The result is 16113.0
but i need the 2 decimal values.
Please give me alternative solutions
Thankx
Merlina

