Originally posted by AnilPrakash Raju:
Thanks Campbell,
I do round it off to 2 decimal points, but if the last digit is 0, i get only decimal point.
Anil
No... You don't get only 1 decimal point. You don't get any number of decimal points. There is *no* formatting to a double. Period.
The only time that you "get" a number of decimal points, is when you print it out (output of the program). In this regard, what is wrong with using NumberFormat? So, it's a string? You are only going to print it out anyway. Use NumberFormat to help with outputing the result -- and leave your double alone.
Henry