for(容器中的元素类型,临时变量,容器变量){
要循环的事;
}
package priv.my.sex;
import java.util.*;
public class TraverseTheCollection extends LinkeListFuLei{
public static void main(String[] args) {
linkedList.add("黄晨阳");
linkedList.add("李阳");
linkedList.add("张三");
ItertorText(linkedList);
for (Object ob:linkedList)
System.out.println(ob);
}
}