title: How to print a string one character at a time?
body: <p>I am having trouble printing a string one character at a time in java. I have to input a string and output it one letter per line. My code is as follows</p>
  
  <pre><code>import java.util.*;
  
  public class StringToMultiLines 
  {
  
  public static void main(String[] args) 
  {   
      String myString;
      int placeInString = 0;
  
      Scanner scan = new Scanner(System.in);
  
      System.out.println("Please enter a string.");
      myString = scan.nextLine();
  
      while(placeInString &lt;= myString.length())
      {
          System.out.println("" + myString.substring(placeInString));
          placeInString ++;
  
  
      }
  }
  
  }
  </code></pre>
  
  <p>This ouptuts the following'
  Please enter a string.
  Hello
  Hello
  ello
  llo
  lo
  o</p>
  
  <p>I have also tried this with no luck</p>
  
  <pre><code>System.out.println("" + myString.subsstring(0, placeInString));
  </code></pre>
  
  <p>and</p>
  
  <pre><code> System.out.println("" + myString.subsstring(placeInString, placeInString));
  </code></pre>