title: Accept a word then print every letter of that word on new line in java?
body: <p>I need to write a program in Java that will accept a string/word then print every letter of that word on a new line. For example, the machine accepts <code>zip</code> then outputs:</p>
  
  <pre><code>Z
  I
  P
  </code></pre>
  
  <p>How do you do this in java? Any simple method or way of doing this would be appreciated.</p>
  
  <p>Here's what I have so far:</p>
  
  <pre><code>import java.util.Scanner;
  public class exercise_4{
      public static void main(String [] args){
          Scanner scan = new Scanner(System.in);
          int a;
          a = 0;
  
          System.out.println("Please enter your words");
          String word = scan.nextLine();
          System.out.println(word.charAt(a));
      }  
  }
  </code></pre>