Article View: borland.public.jbuilder.java.language
Article #15046Re: StrToInt function?
From: Matt Welsh
Date: Tue, 13 Jul 1999 00:00
Date: Tue, 13 Jul 1999 00:00
34 lines
1304 bytes
1304 bytes
You'd be better off to use the public static int parseInt(String s) throws NumberFormatException and catch the NumberFormatException to do something meaningful... -Matt Dave Hatzenbuehler wrote: > > I am looking for a way to convert a string to an integer value. I have > the following line of code: > > String cStr = 'abc'; > int nNum = Integer.valueOf( cStr ).intValue. > > I keep getting "intValue not found in java.lang.Integer." I have import > java.lang.Integer and I still get this error. Can someone please point > me in the right directin. > > Thanks, > Dave Hatz -- /** * Matt Welsh * Borland * R&D Engineer, JBuilder * * @param email mwelsh@Borland.com * @param WWW http://www.borland.com * @deprecated http://www.inprise.com */
Technical Details
Message-ID:
<378BB694.CDA24086@inprise.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<378B674D.8818D1F6@insynclh.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f74b3,ecbec2f1a10fd049 X-Google-Attributes: gidf74b3,public From: Matt Welsh <mwelsh@inprise.com> Subject: Re: StrToInt function? Date: 1999/07/13 Message-ID: <378BB694.CDA24086@inprise.com> X-Deja-AN: 500687889 Content-Transfer-Encoding: 7bit References: <378B674D.8818D1F6@insynclh.com> Organization: Inprise Corporation Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 Newsgroups: borland.public.jbuilder.java.language