Problem while storing large value in double variable
Joined: Dec 18, 2006
Hi, I want to know the following:
We are calculating the amount for balance. The value which we are getting is very large,hence causing the value to be converted in exponential format(e.g 12.3E+4). Now we want to show the users the amount on JSP without exponent symbol.We are using double data type. Please suggest which data type should I use? And what other possibilities?
Thank you Regards Baseet Ahmed I.T
author and iconoclast
It's not the data type -- it's just how you're converting the value to a String. If you use the java.text.DecimalFormat class, it lets you specify exactly what you want your output numbers to look like.