🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Getting Input

#18777
From: Emmanuel Vlamakis
Date: Sun, 26 Apr 1998 00:00
22 lines
847 bytes
Hello, I'm new to Java and trying to learn it on my own.  One thing I
haven't yet been able to figure out is how do I get user input from the
keyboard.  For example, in C++ I might have...

int main()
{
    int Temp;


    cout <<"Please enter a number: ";
    cin >>Temp;

    return 0;
}

How would I write the equivalent code in Java? Please show me an example.

Best Regards,


Emmanuel Vlamakis
Technical Details
Message-ID: <6i10vt$6ic9@forums.borland.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f74b3,e7144664b404f5,start
X-Google-Attributes: gidf74b3,public
From: "Emmanuel Vlamakis" <E-Vlamakis@govst.edu>
Subject: Getting Input
Date: 1998/04/26
Message-ID: <6i10vt$6ic9@forums.borland.com>
X-Deja-AN: 347986343
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.2106.4
Organization: Preferred Company
Newsgroups: borland.public.jbuilder.java.language