Wait For Return Key Press Using Java Scanner

Posted by Gordon on Stack Overflow See other posts from Stack Overflow or by Gordon
Published on 2010-04-27T11:38:24Z Indexed on 2010/04/27 11:43 UTC
Read the original article Hit count: 231

What would be the best way to wait for a return key press from the user using the Java Scanner Class?

In a command line tool I would like the user to confirm before carrying out an action.

Please correct me if there a more standard way of doing this in a command line tool.

© Stack Overflow or respective owner

Related posts about java

Related posts about scanner