🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: converting from Text to Double or Int

#19666
From: Allan Bressler
Date: Mon, 12 Jan 1998 00:00
29 lines
1324 bytes
OK.  That will give me the value, except how do I pass the text to the
valueOf( ), because valueOf() is looking for a string type.

I hope this makes sense.

Allan

Carl Hewitt wrote:

> Try
>   Double.valueOf(String s);
>   Integer.valueOf(String s);
>
> Carl
>
> Allan Bressler wrote in message <34B67EE3.51CEE19@earthlink.net>...
> >Hi,
> >
> >I'm trying to convert text entered in a TextField to an integer so that
> >I can use that value to look up an index in an array.  I also need to
> >convert some other text in a TextField to a Double to do some
> >calculations with it.  I can't find the command to do this (if there is
> >one).  I'm new at this so please be as specific as possible.
> >
> >Thanks in advance.
> >
> >Allan
> >
Technical Details
Message-ID: <34BA454D.92891088@earthlink.net>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <34B67EE3.51CEE19@earthlink.net> <6960od$7bv18@forums.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f74b3,95acace74d11f1d5
X-Google-Attributes: gidf74b3,public
From: Allan Bressler <abressler@earthlink.net>
Subject: Re: converting from Text to Double or Int
Date: 1998/01/12
Message-ID: <34BA454D.92891088@earthlink.net>
X-Deja-AN: 315253702
Content-Transfer-Encoding: 7bit
References: <34B67EE3.51CEE19@earthlink.net> <6960od$7bv18@forums.borland.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Organization: None
Newsgroups: borland.public.jbuilder.java.language