🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.api
Article #1383

Re: readInt()

#1383
From: Avi Abrami
Date: Mon, 11 Feb 2002 05:16
23 lines
1600 bytes
Mansoor Abdi wrote:

> I want write program that i can read input integer from keyboard
> I use readInt() method but i can not successful,
> for example one program that this program get two integer
> and display sum of two integer
> Please help me.

Hi Mansoor,
It's a bit difficult for me to help you without seeing
your code, but allow me to suggest the following:

Read the integer from the keyboard as a String,
and then convert it to an integer using:

Integer.parseInt()

See the javadoc for class java.lang.Integer
(Of-course, I'm assuming that you know how
to read a String from the keyboard.)

Good Luck,
Avi.
Technical Details
Message-ID: <3C675391.FAA25CC@intersystemsww.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!supernews.com!news.tele.dk!small.news.tele.dk!24.226.1.12!feed.cgocable.net!out.nntp.be!propagator-SanJose!in.nntp.be!newsfeed01.tsnz.net!newsfeeds.ihug.co.nz!ihug.co.nz!dnews
References: <3c6742e9_2@dnews>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 1089d0,8a574f923b4a9301
X-Google-Attributes: gid1089d0,public
X-Google-ArrivalTime: 2002-02-10 21:11:41 PST
Message-ID: <3C675391.FAA25CC@intersystemsww.com>
Date: Mon, 11 Feb 2002 07:16:01 +0200
From: Avi Abrami <aabrami@intersystemsww.com>
Organization: InterSystems Ltd
X-Mailer: Mozilla 4.78 [en] (Windows NT 5.0; U)
X-Accept-Language: en
MIME-Version: 1.0
Newsgroups: borland.public.jbuilder.java.api
Subject: Re: readInt()
References: <3c6742e9_2@dnews>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 212.199.57.194
X-Trace: dnews 1013404236 212.199.57.194 (10 Feb 2002 21:10:36 -0800)
Lines: 25
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!supernews.com!news.tele.dk!small.news.tele.dk!24.226.1.12!feed.cgocable.net!out.nntp.be!propagator-SanJose!in.nntp.be!newsfeed01.tsnz.net!newsfeeds.ihug.co.nz!ihug.co.nz!dnews