Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations sizbut on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

java newbie: accept input from users

Status
Not open for further replies.

R17

Programmer
Jan 20, 2003
267
PH


i'd like to ask input from my users... how do i do that? =(

 
To ask some input, print the request string on System.out :

Code:
import java.io.*
...
System.out.println ("Please enter something: ");
BufferedReader in_reader = new BufferedReader (new InputStreamReader (System.in));

String input_from_user = in_reader.readLine ();
...

--
Globos
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top