Article View: borland.public.jbuilder.java.language
Article #7249Re: Converting int to string
From: Motty Adler
Date: Thu, 05 Jul 2001 13:49
Date: Thu, 05 Jul 2001 13:49
45 lines
2480 bytes
2480 bytes
Thanks. I was trying to convert some Delphi code - And I am starting to fathom that we are dealing with a tottaly different beast here :-) Michael Rachow wrote: > Ohh sorry, > > Seems to to be such a thing one should pull out by ones own. > I forgot completly to add here: > when one starts with Java. > If one had to understand how generic types and their wrapper classes play > together one learns a lot on Java. > By just answering your question I don't wanted to remove your chance to dive > deeper into Java. > Sorry again for that incomplete sentence. > "Michael Rachow" > > <michael@famrachow.de> schrieb im Newsbeitrag news:3b436a72_1@dnews... > > Seems to to be such a thing one should pull out by ones own. > > A general hint > > You need to wrap every generic type by its corresponding class type > > to be able to call methods on it. > > In most cases you can use that wrapper class as a factory > > which means to do not need an instance of that wrapper class. > > For your case you can let the class Integer do this for you: > > > > beingAStringNow = Integer.toString(myint); > > > > Michael > > Motty Adler <MAdler@TheKosher.net> schrieb in im Newsbeitrag: > > 3B434ACC.C76F849F@TheKosher.net... > > > Hi. > > > > > > I am (brand) new to java. > > > > > > My question is simple- I want to assign a int to the caption of a > > > jlabel how do it. > > > > > > JLabel1.setCaption(????(myint)); > > > > > > thanks > > > > > > >
Technical Details
Message-ID:
<3B44704D.5EF1938C@TheKosher.net>Path:
arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!news.he.net!news-hog.berkeley.edu!ucberkeley!nntp-relay.ihug.net!newsfeeds.ihug.co.nz!ihug.co.nz!dnewsReferences:
<3B434ACC.C76F849F@TheKosher.net> <3b436a72_1@dnews> <3b443a15$1_2@dnews>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f74b3,dfeeb4f7ea6be38c X-Google-Attributes: gidf74b3,public X-Google-ArrivalTime: 2001-07-05 06:54:56 PST Message-ID: <3B44704D.5EF1938C@TheKosher.net> Date: Thu, 05 Jul 2001 09:49:01 -0400 From: Motty Adler <MAdler@TheKosher.net> Reply-To: MAdler@TheKosher.net X-Mailer: Mozilla 4.51 [en]C-NECCK (Win98; U) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: borland.public.jbuilder.java.language Subject: Re: Converting int to string References: <3B434ACC.C76F849F@TheKosher.net> <3b436a72_1@dnews> <3b443a15$1_2@dnews> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 64.24.42.171 X-Trace: dnews 994340804 64.24.42.171 (5 Jul 2001 06:46:44 -0700) Lines: 46 Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!news.he.net!news-hog.berkeley.edu!ucberkeley!nntp-relay.ihug.net!newsfeeds.ihug.co.nz!ihug.co.nz!dnews