Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

String conversion in to double

 
reena Mehta
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

i just want convert string value-8.099996484816074E-4 in double
 
Mohamed Sanaulla
Bartender
Posts: 3166
34
Google App Engine Java Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
reena Mehta wrote:
i just want convert string value-8.099996484816074E-4 in double

Did you try exploring the Double class?
 
Rob Spoor
Sheriff
Posts: 20827
68
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Reena, this is the second time you've created, in a time frame of a few minutes, two nearly identical posts. Please UseOneThreadPerQuestion. If you need to add something to your original request, just edit your first post if there are no replies yet, and otherwise post a new reply to the existing thread.
 
Aditya Yagnik
Greenhorn
Posts: 7
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey Reena,

I am not sure what format do you want to see output. However, if its just matter of converting string to double you can use parseDouble method in Double class as below.

Best regards,
Aadi
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!