A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
Elasticsearch in Action
this week in the
need help with string to double conversion
Joined: Mar 15, 2006
Mar 15, 2006 16:10:00
hey im doing a program i cant get right,
first im trying to get input and convert it to a double value
im using the JOptionPane.showDialog for the input,
second wat symbol do u use for the square root of or the square of something in an equation?
Joined: Feb 07, 2005
Mar 15, 2006 16:24:00
First to convert a
to a double you can use Double.parseDouble.
has methods for taking the square root and square.
There is no symbol for square root or square.
Joined: Aug 31, 2004
Mar 15, 2006 16:34:00
Welcome to JavaRanch!
Please revise your display name to meet the
JavaRanch Naming Policy
. To maintain the friendly atmosphere here at the ranch, we like folks to use real (or at least real-looking) names.
You can edit your name
. Thank you for your prompt attention!
PS: As Keith said, there are no
operators for squares or roots, so do
make the mistake of using the bitwise "exclusive or," as in x^2. Instead, you should use methods in the Math class.
"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award."
I agree. Here's the link:
subject: need help with string to double conversion
help in return type
Cant get JButton to appear in the game
how do I test if an object exists yet?
Counting in Array List/ Standard deviation
User input into array
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015