Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
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
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: 3429
Which next method did you use ? Have you tried nextLine() and/or hasNextLine() ?

wood burning stoves
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