Double parsing problems


I have a String with a number data like  "16777645" which I need to convert to double. So I used Double.parse(sData), but double parsed like 1.6777645E7. How can I do parsing with double returns 16777645
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

>>but double parsed like 1.6777645E7

Why would that be a problem? That's just the form shown when you print it as as String
accarvajalAuthor Commented:
no, if my data (in my case is an ID) 16777645, next to parsing, I convert into String again so 1.6777645E7 is different than 16777645
>>so 1.6777645E7 is different than 16777645

It isn't different. If it's a number (as opposed to a String) E7 has no meaning. It only has a meaning as a view of the number      

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Announcing the Winners!

The results are in for the 15th Annual Expert Awards! Congratulations to the winners, and thank you to everyone who participated in the nominations. We are so grateful for the valuable contributions experts make on a daily basis. Click to read more about this year’s recipients!

accarvajalAuthor Commented:
if my String Data "16777645" parsing to Double which results in 1.6777645E7, when converting to String again, data would be "1.6777645E7", how do I tell to user that "1.6777645E7" (showed on JTextField) is looking at field is actually "16777645" that is its ID?
You could do e.g.

field.setText("" + (long)yourDouble);
just use

both might be correct..

hope this will help
Closer control over how the String is rendered can be achieved with NumberFormat
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.