Implementing "press any key to continue" in Java | shanhe.me
Well, strictly speaking, it is "press ENTER to continue".
Try
System.in.read(new byte[2]);
Under Windows, an ENTER gives \r\n. So 2 bytes are needed here.
Read full article from Implementing "press any key to continue" in Java | shanhe.me
No comments:
Post a Comment