title: Printing user input in Java?
body: <p>Say I had the Scanner method, and I want to print the user input after that. </p>
  
  <p>Take this code for instance:</p>
  
  <pre><code>    String randomWords;
      Scanner kb = new Scanner(System.in);
  
      System.out.print("Please enter two words separated: ");
  
      randomWords = kb.next();    
      System.out.println(randomWords);
  </code></pre>
  
  <p>And if the two separated words entered were </p>
  
  <pre><code>hello world
  </code></pre>
  
  <p>Only</p>
  
  <pre><code>hello 
  </code></pre>
  
  <p>is printed</p>
  
  <p>Why is this? and how can I print both of the words with the space included? </p>
  
  <p>Thank you.</p>