• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Keyboard events without GUI

 
vivien siu
Ranch Hand
Posts: 143
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi, is there a way to accept input from user without using any GUI interface? My program will take in the key typed by user then responds according to the key typed. All this will be done in Command Prompt and run from JAR file.
 
marc weber
Sheriff
Posts: 11343
Java Mac Safari
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you looked at the java.util.Scanner class?
 
vivien siu
Ranch Hand
Posts: 143
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yups, using the System.in for the constructor argument. Thanks
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic