Hi Ranchers, I was using NumberFormat for making the minimum integer digit to be 15. I encountered a NumberFormatException while converting back to Double. Now my real Requirment is to enable some calculation for values more than 10 digits. Here is the code. Where am i going wrong. Obviously the NumberFormat will give a value with like say "1,500,000,000,000,000" and when i convert this, i get NumberFormatException.
Now is there a method which will give me a Double value and also parsed value.
Double.valueOf is not expecting a String containing commas.
But I think you need to think more about what you are doing. A Format object, like one of type NumberFormat is there to parse strings into numbers or format numbers as string, or both.
There is no emoticon for what I am feeling!
Joined: Oct 03, 2005
Thanx Jeff, Still i am not able to figure out the solution. Let me put it this way, I have a String which is a number of 15 Digits length. Now, I want to do some calculation on that, hence i am converting to a Double. Now it becomes 1.5E15. I cant do any calculation with this. I want number as 1500000000000000. So what is that i have to do??