Skip to Main Content

New to Java

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

scanner -- how to count spaces a part of a string

843789Jun 20 2009 — edited Jul 27 2009
I'm fooling around with Scanner in a little program just to teach myself. Right now, when given the chance to enter data, anything after a space is ignored, so, for example, if one enters "John Smith" for a name entry, on printout it only says "John." How can I fix this?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 24 2009
Added on Jun 20 2009
30 comments
1,246 views