🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.language
Article #15534

Re: Conversion

#15534
From: Tom Heagy
Date: Fri, 04 Jun 1999 00:00
22 lines
1240 bytes
The shortcut method is to simply concatinate it to another String
constant [or variable].
    int iValue = 5;
    JOptionPane.ShowMessageDialog(this, iValue + "");
            - or -
    JOptionPane.ShowMessageDialog(this, iValue + " is your value.");
            - or -
    String sValue = "Here is your value: ";
    JOptionPane.ShowMessageDialog(this, sValue + iValue);



Quach Hoa Thanh wrote:

> I have a variable type integer. How do you convert it to a String so
> that I can display it using
> JOptionPane.ShowMessageDialog(this,(String)integer). IntToStr is the
> funtion that I use in Delphi.
>
> Thank you all for your help.
>
> Thanh
Technical Details
Message-ID: <3757E112.C8D2AA3E@sciatl.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <375734C1.929A4A33@ns.sympatico.ca>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f74b3,2ba04f02b696d2cb
X-Google-Attributes: gidf74b3,public
From: Tom Heagy <tom.heagy@sciatl.com>
Subject: Re: Conversion
Date: 1999/06/04
Message-ID: <3757E112.C8D2AA3E@sciatl.com>
X-Deja-AN: 485679785
Content-Transfer-Encoding: 7bit
References: <375734C1.929A4A33@ns.sympatico.ca>
To: thq.qua@ns.sympatico.ca
X-Accept-Language: en
Content-Type: text/plain; charset=us-ascii
Organization: Another Netscape Collabra Server User
Mime-Version: 1.0
Newsgroups: borland.public.jbuilder.java.language