天天看点

Java集合——集合的遍历

1.Iterator;

Java集合——集合的遍历

先建立一个Student类:

再建立测试类;

输出结果:

2.Foreach;