title: Read words using scanner in Java
body: <p>i wish to read multiple inputs on a single line in java.</p>
  
  <p>Ex:</p>
  
  <pre><code>System.out.print("Input name, age, address, city: ");
  </code></pre>
  
  <p>user will input these details separated with space</p>
  
  <p>what is expected in console:</p>
  
  <p>Input name, age, address, city: Tom, 10, USA, NY</p>
  
  <p>Any idea how to do this, using the Scanner class. Thanks.</p>