Skip to Main Content

New to Java

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Double cannot be "dereferenced" to toString

807598Dec 10 2005 — edited Dec 10 2005
I am trying to change a Double into a string to be used by a JTextField.


double answerTest=100.0;
String answerTest2= answerTest.toString();

Upon trying to compile it doesn't like it. I'm a beginner, how can I accomplih this? I'm just trying to do a calculation on "answerTest" and then display it on a form.


Thanks!

Chris
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 7 2006
Added on Dec 10 2005
4 comments
558 views