title: ListIterator previous method not working
body: <pre><code>package wrap;
  import java.util.*;
  public class ArrayListDemo {
  
      public static void main(String [] args){
          ArrayList&lt;String&gt; a=new ArrayList&lt;String&gt;();
          a.add("B");
          a.add("C");
          a.add("D");
          ListIterator&lt;String&gt; i=a.listIterator();
          while(i.hasPrevious()){
              System.out.println(i.previous());
          }
      }
  
  }
  </code></pre>
  
  <p>The program works fine for hasNext() and next() methods but for hasPrevious() and previous() it displays a message as below::</p>
  
  <pre><code>&lt;terminated&gt; ArrayListDemo [Java Application] C:\Program Files (x86)\Java\jre7\bin\javaw.exe (28-Oct-2013 3:20:35 PM)
  </code></pre>