aspose file tools*
The moose likes Beginning Java and the fly likes Input from Keyboard - urgent please Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Input from Keyboard - urgent please" Watch "Input from Keyboard - urgent please" New topic
Author

Input from Keyboard - urgent please

Rashid Ali
Ranch Hand

Joined: Jan 16, 2001
Posts: 349
Dear participants
Could anybody suggest me how to take input from keyboard for just printing on screen in a very simple way.
Thanks
Rashid
Cindy Glass
"The Hood"
Sheriff

Joined: Sep 29, 2000
Posts: 8521
You need to use System.in to get the console input. However you need to run it through a BufferedReader if you want to take in more than 1 char.


[This message has been edited by Cindy Glass (edited February 17, 2001).]


"JavaRanch, where the deer and the Certified play" - David O'Meara
Randall Twede
Ranch Hand

Joined: Oct 21, 2000
Posts: 4347
    
    2

Printing to the screen is even easier.
continueing Cindy's example:
System.out.println(stringInt);


SCJP
Visit my download page
Rashid Ali
Ranch Hand

Joined: Jan 16, 2001
Posts: 349
thanks for both of your messages.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Input from Keyboard - urgent please