Article View: borland.public.jbuilder.java.language
Article #16089Re: Converting Strings into integer values
From: Omer Azhar Qureshi
Date: Tue, 06 Apr 1999 00:00
Date: Tue, 06 Apr 1999 00:00
12 lines
876 bytes
876 bytes
George, the two most common ways to do that are String MyString = "123456"; int iNumber = Integer.valueOf (MyString).intValue (); OR int iNumber = Integer.parseInt (MyString); if the MyString variable dosent contain a proper number a NumberFormatException is thrown.... hope this is what u needed Oaq
Technical Details
Message-ID:
<7ec76i$pf56@forums.borland.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<7ec63e$pf45@forums.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f74b3,273d0ff32f88d7f8 X-Google-Attributes: gidf74b3,public From: "Omer Azhar Qureshi" <oaq@systemeltd.com.pk> Subject: Re: Converting Strings into integer values Date: 1999/04/06 Message-ID: <7ec76i$pf56@forums.borland.com> X-Deja-AN: 463140103 References: <7ec63e$pf45@forums.borland.com> X-Priority: 3 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.0810.800 Organization: Another Netscape Collabra Server User X-MSMail-Priority: Normal Newsgroups: borland.public.jbuilder.java.language