🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: String to Int?

#18623
From: Regis Eloi
Date: Mon, 11 May 1998 00:00
22 lines
1206 bytes
ANDERSSON HAKAN wrote:

> Hi!
>
> I have a little problem. I want to convert a String to an Integer. But I
> do not know how to do it...

String s = new String("18");int i;try { i = Integer.parseInt(s);
} catch (NumberFormatException e){
}

Hope that helps

Regis
--
________________________________________________________________________
 Regis Eloi       mailto:R.Eloi@dcs.hull.ac.uk
 The University of Hull (England) - Department of Computer Science
 Institut d'Informatique d'Entreprise (France)
 My CV is on the Web at http://www-eleves.iie.cnam.fr/eloi/cv_en.html
________________________________________________________________________
Technical Details
Message-ID: <3556ECFD.457CA5D4@dcs.hull.ac.uk>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <3556D5C9.6C34@ios.chalmers.se>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f74b3,a6fa7eb96ccacb2c
X-Google-Attributes: gidf74b3,public
From: Regis Eloi <R.Eloi@dcs.hull.ac.uk>
Subject: Re: String to Int?
Date: 1998/05/11
Message-ID: <3556ECFD.457CA5D4@dcs.hull.ac.uk>
X-Deja-AN: 352193935
Content-Transfer-Encoding: 7bit
References: <3556D5C9.6C34@ios.chalmers.se>
Mime-Version: 1.0
Reply-To: R.Eloi@dcs.hull.ac.uk
Content-Type: text/plain; charset=us-ascii
Organization: University of Hull
Newsgroups: borland.public.jbuilder.java.language