• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 222
  • Last Modified:

Casting a double into a String

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
blarouche
Asked:
blarouche
  • 2
2 Solutions
 
CEHJCommented:
text = Double.toString(pointer.getlastclose(select));
0
 
Ajay-SinghCommented:
use String.valueOf(double)
0
 
CEHJCommented:
:-)
0

Featured Post

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now