In jsp page After decimal i need only 2 values(for ex:477.74)
I displaying report for work wise progress in jsp. At end of line i calculating total amount of Contract . In my result it is displaying 477.74999999994. For reference you can see attached screen shot file. But i want result in this format 477.74(i dont want to be round off).
I attached jsp page for your reference .
Please help me & need code for that
Re: In jsp page After decimal i need only 2 values(for ex:477.74)
Read the API docs for java.text.DecimalFormat, it has a bit on rounding which may solve your problem.