import java.util.*;
public class ArrayListTesting
{
public static void main(String []args)
{
LinkedList<String> list = new LinkedList<String>();
list.add("apple");
list.add("pear");
list.add("tree");
Iterator <String> iterate = list.iterator();
System.out.println(iterate.next());
System.out.println(iterate.previous());
System.out.println(iterate.next());
System.out.println(iterate.hasNext());
}
}
it keep telling me it an error.