I am having 156 amounts and when I am summing up to get the total amount the amount format is like 323E43.32 which I dont want but I want it in 344234.45 format. I got the individual amount in string and before performing any operation I have typcasted it to double value.
Is there a way to format a amount from 323E43.32 to 344234.45 in java?
Code Snippet:
for (int i = 0; i < numrows; i++)
{
double temp=Double.parseDouble(orders.getString("AMOUNT"));
totalAmount=totalAmount+temp;
bean.setTotalAmount(totalAmount);
}
May this thread solve your problem?
Java division for double and float without E
with this code: