this is very simple program of collection but not running : <p>I am using latest jdk to run this program. i cant find the right solution here pls help.</p>

<pre><code>import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;

class ArrayListDemo{
    List&lt;String&gt; list = new ArrayList&lt;&gt;();
    list.add("abc");
    list.add("xyz");
    Iterator&lt;String&gt; itr = list.iterator();
    while(itr.){
            System.out.println(itr.next());
    }
}
</code></pre>
