for - each循环能够迭代数组或集合中的元素。
The for-each loop can iterate over the elements of an array or of a collection. Listing 1 shows the syntax of iterating over a collection with the for-each loop.
然后,一个while循环迭代数据集,在一个方便的数组中存储信息以便将来进行显示。
A while loop then iterates through the dataset, storing the information in a convenient array for later display.
for - each循环:当迭代数组时,编译器生成归纳变量和标准的数组迭代语法。
For-each loop: When iterating over an array, the compiler generates an induction variable and the standard array iteration idiom.
应用推荐