This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes Scanner debugging help Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Scanner debugging help" Watch "Scanner debugging help" New topic
Author

Scanner debugging help

Haani Naz
Greenhorn

Joined: May 30, 2010
Posts: 23
Hi there,

I have the following piece of code which fails at the point it needs to accept input and i can't seem to figure out why.






The issue is at line 115.


Here is the output:



As you can see instead accepting input it skips it.

can somebody please tell me why?

thanks in advance!
Anniruddh Rana
Greenhorn

Joined: Nov 30, 2011
Posts: 18



Change that to



and give it a try.

i.e. use System.out.print there instead of System.out.println
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Scanner debugging help
 
Similar Threads
Library System
Do not know how to code some cases and exit the loop with "Enter"
Help with Value Returning Methods
coin flip assignment help
how to compare if object exists in arraylist and add if doesn't