Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Casting a double into a String

Posted on 2006-11-22
3
Medium Priority
?
221 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 300 total points
ID: 17998170
text = Double.toString(pointer.getlastclose(select));
0
 
LVL 23

Assisted Solution

by:Ajay-Singh
Ajay-Singh earned 200 total points
ID: 17998171
use String.valueOf(double)
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 17998229
:-)
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
The viewer will learn how to implement Singleton Design Pattern in Java.
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses

824 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