java - How to determine if anything has been entered into the console window? -



java - How to determine if anything has been entered into the console window? -

in java, i'm looking method allow me wait user press key before continuing (or if 1 not exist, i'm looking implement bufferedreader, if possible). how determine if user has typed any key - not enter?

this similar console.readkey() in c#.

you may seek jcurses.

sample:

public class test{ public static void main(string []args){ jcurses.system.inputchar ch; ch=jcurses.system.toolkit.readcharacter(); system.out.println(ch.getcode()); } }

java

Comments

Popular posts from this blog

How do I check if an insert was successful with MySQLdb in Python? -

delphi - blogger via idHTTP : error 400 bad request -

postgresql - ERROR: operator is not unique: unknown + unknown -