This week's book giveaway is in the Other Languages forum. We're giving away four copies of Functional Reactive Programming and have Stephen Blackheath and Anthony Jones on-line! See this thread for details.
Hi, I want the user who can press the ENTER key and then go to the next function. e.g. Press ENTER key to calculate the number of year. How can I use it with System.in? Thanks for help Andrew
posted 13 years ago
With System.in, enter is the only key press you can detect as soon as it happens. If you call readLine() it will return as soon as the user hits enter. The user may have typed other things as well, but you can ignore them.