Article View: borland.public.jbuilder.java.language
Article #17688Re: integer problem
From: Hadi Abdo
Date: Mon, 19 Oct 1998 00:00
Date: Mon, 19 Oct 1998 00:00
11 lines
865 bytes
865 bytes
Hello,
After receiving the string from the JtextField try this :
int age = Integer.valueOf(string); // string is a string of numbers
This method throws the NumberFormatException so you have to implement
the try catch block.
Hope this helps.
--
HADI ABDO
Technical Details
Message-ID:
<362AFDEE.CBDF3A2D@dm.net.lb>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<01bdf91b$b095ea50$881aea9e@ukp10008>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f74b3,f31fdefc874bb997 X-Google-Attributes: gidf74b3,public From: Hadi Abdo <skfdid@dm.net.lb> Subject: Re: integer problem Date: 1998/10/19 Message-ID: <362AFDEE.CBDF3A2D@dm.net.lb> X-Deja-AN: 402733448 Content-Transfer-Encoding: 7bit References: <01bdf91b$b095ea50$881aea9e@ukp10008> X-Accept-Language: en Content-Type: text/plain; charset=us-ascii Organization: Another Netscape Collabra Server User Mime-Version: 1.0 Reply-To: skfdid@dm.net.lb Newsgroups: borland.public.jbuilder.java.language