阅读下列程序public class Example { public static void main(String[] args) {ArrayList list = new ArrayList(); // 创建ArrayList集合list.add("Tom"); // 向该集合中添加字符串list.add("Jerry");list.add("Donald");for(ListIterator it = list.listIterator();it.hasNext();){Object object = it.next();if("Jerry".equals(object)){it.set("Speike");}}System.out.println(list); }}程序的运行结果是( )
A. [Tom, Speike, Donald]
B. [Tom, Jerry, Speike, Donald]
C. [Tom, Donald]
D. [Tom, Jerry, Donald]