Solved

Casting a double into a String

Posted on 2006-11-22
3
212 Views
Last Modified: 2010-03-31
Hi Experts,

I need to cast a double into a String. In my code below pointer.getlastclose(select) return a double.



String select;
select = (String) jComboBox1.getSelectedItem();

String text;
text = (String) pointer.getlastclose(select);
templateLabel.setText(text);
0
Comment
Question by:blarouche
  • 2
3 Comments
 
LVL 86

Accepted Solution

by:
CEHJ earned 75 total points
Comment Utility
text = Double.toString(pointer.getlastclose(select));
0
 
LVL 23

Assisted Solution

by:Ajay-Singh
Ajay-Singh earned 50 total points
Comment Utility
use String.valueOf(double)
0
 
LVL 86

Expert Comment

by:CEHJ
Comment Utility
:-)
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
The viewer will learn how to implement Singleton Design Pattern in Java.

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now