🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: integer problem

#17698
From: Vasudevan Srinivasan
Date: Mon, 19 Oct 1998 00:00
21 lines
1048 bytes
Hi,
you can also use:
int age= Integer.parseInt(string);

i believe Integer.valueOf(string) returns another Integer - not basic int
type. pls check with help.
Vasu

Hadi Abdo wrote:

> 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: <362B43D9.481A1BC1@netrisk.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <01bdf91b$b095ea50$881aea9e@ukp10008> <362AFDEE.CBDF3A2D@dm.net.lb>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f74b3,f31fdefc874bb997
X-Google-Attributes: gidf74b3,public
From: Vasudevan Srinivasan <vasudevan@netrisk.com>
Subject: Re: integer problem
Date: 1998/10/19
Message-ID: <362B43D9.481A1BC1@netrisk.com>
X-Deja-AN: 402811536
Content-Transfer-Encoding: 7bit
References: <01bdf91b$b095ea50$881aea9e@ukp10008> <362AFDEE.CBDF3A2D@dm.net.lb>
Content-Type: text/plain; charset=us-ascii
Organization: NetRisk Inc.
Mime-Version: 1.0
Newsgroups: borland.public.jbuilder.java.language