aspose file tools*
The moose likes Beginning Java and the fly likes conversion Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "conversion" Watch "conversion" New topic
Author

conversion

mer imperio
Greenhorn

Joined: Aug 11, 2004
Posts: 1
Anybody from the group who can give help. I am using java applets. I want to convert the long or double data type to its string equivalent so that I can display it in textbox. What will i do? What is the code? Pls. help me... Thnks in advanced
Sonny Gill
Ranch Hand

Joined: Feb 02, 2002
Posts: 1211

Have a look at the javadocs for valueOf(..) methods in String class (java.lang) package
Java docs


The future is here. It's just not evenly distributed yet. - William Gibson
Consultant @ Xebia. Sonny Gill Tweets
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17257
    
    6

I am going to move this to the more appropriate Java In General (Beginner) forum.

This forum is for Servlets questions.

Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
Shashank Agarwal
Ranch Hand

Joined: May 20, 2004
Posts: 105
Here's the code to convert a double into its string equivalent -

Double d = 123;
String s = Double.toString(d);

You may also set the text in the textbox directly

textboxobject.setText(Double.toString(d));

Cool, huh!!!
 
Consider Paul's rocket mass heater.
 
subject: conversion