title: Printing a string of text into multiple lines? Java
body: <p>I am using the scanner utility to read a sentence inputted from the keyboard. I want to know how to be able to transform this string text into multiple lines..</p>
  
  <p>So for example, If I were to enter</p>
  
  <pre><code>"How are you  doing?" (two spaces between you and doing)
  </code></pre>
  
  <p>How would I be able to make this print onto multiple lines?</p>
  
  <pre><code>How
  are
  you
  
  doing?
  </code></pre>
  
  <p><em>SOLVED</em> by using System.out.println(str.replace(" ", "\n"))</p>
  
  <p>Thanks all.</p>