• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Input from Keyboard - urgent please

 
Rashid Ali
Ranch Hand
Posts: 349
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 8521
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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).]
 
Randall Twede
Ranch Hand
Posts: 4439
3
Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Printing to the screen is even easier.
continueing Cindy's example:
System.out.println(stringInt);
 
Rashid Ali
Ranch Hand
Posts: 349
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks for both of your messages.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic