• Post Reply Bookmark Topic Watch Topic
  • New Topic

Java getch()?  RSS feed

 
Alo Sanyal
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is there a method equivalent to getch() in C?
 
Sebastian Janisch
Ranch Hand
Posts: 1183
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sounds like a regular I/O Stream in Java
 
Rob Spoor
Sheriff
Posts: 20903
81
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is System.in.read(), but it's not exactly the same. Where getch() reads the next character immediately, System.in.read() does not return until the user pressed enter.
 
Maruthi Janardhan
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I tried something real cool. I wrote a java getCh() method here
Hope it has no bugs

 
Tanzy Akhtar
Ranch Hand
Posts: 110
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Nice one Maruthi.. Keep it up..
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!