Nuacht
for-each loop in java is the enhanced version of for loop. It is introduced from JDK 5. It is used to iterate all elements of an array or Collection.
Item 58: Prefer for-each loops to traditional for loops(for-each 循环优于传统的 for 循环) As discussed in Item 45, some tasks are best accomplished with streams, others with iteration.
Cuireadh roinnt torthaí i bhfolach toisc go bhféadfadh siad a bheith dorochtana duit
Taispeáin torthaí dorochtana