File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Beginning Java and the fly likes waiting for user input Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "waiting for user input" Watch "waiting for user input" New topic

waiting for user input

jam hall

Joined: Sep 06, 2005
Posts: 4
When i've output data to the screen using command line interface i'd like to request the user to hit enter to return to the menu screen. Using readLine method of BufferedReader it was possible to read a blank line. Using the next mehtod of Scanner it seems not to allow the input of a blank line. Does anyone know a way round this problem?

Thanks Ahead
Joanne Neal

Joined: Aug 05, 2005
Posts: 3419
Which next method did you use ? Have you tried nextLine() and/or hasNextLine() ?

Consider Paul's rocket mass heater.
subject: waiting for user input
Similar Threads
Removing business logic???
Getting an input from the user using command-line arguments?
Adding second screen to android app comes up blank
need help i have assighment to finish before end of day
Redirecting to the user's home page