The scanner is breaking at the spaces.
EDIT: The 'Scanning' Java Tutorial states:
By default, a scanner uses white space to separate tokens. (White space characters include blanks, tabs, and line terminators. For the full list, refer to the documentation for Character.isWhitespace.)
You can use the useDelimiter() method to change these defaults.