import java.util.List;
import java.util.ArrayList;
//import java.util.Iterator;
import java.util.ListIterator;//iterator 拼写错误
public class IteraterDemo {
public static void main(String args[]) throws Exception{
List<String> list = new ArrayList<String>();
list.add("A");
list.add("B");
list.add("C");
ListIterator<String> iter = list.listIterator();
while(iter.hasNext()){
System.out.print(iter.next()+".");
}
System.out.println();
while(iter.hasPrevious()){
System.out.print(iter.previous()+".");
}
}
}