my dog learned polymorphism
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: 3742
Which next method did you use ? Have you tried nextLine() and/or hasNextLine() ?

I agree. Here's the link:
subject: waiting for user input
It's not a secret anymore!