Solved

Casting a double into a String

Posted on 2006-11-22
3
218 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 86

Accepted Solution

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

Assisted Solution

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

Expert Comment

by:CEHJ
ID: 17998229
:-)
0

Featured Post

Enroll in May's Course of the Month

May’s Course of the Month is now available! Experts Exchange’s Premium Members and Team Accounts have access to a complimentary course each month as part of their membership—an extra way to increase training and boost professional development.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Java string replace 11 80
Facing this issue for maven proxy setting 2 45
servlet and mdb, jms error 1 83
junit as external jar or library 7 59
This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
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 …
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
Suggested Courses

752 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