0
What is 'enhanced for' loop used for?
Also called 'for each' loop, is a completely different loop. but what is its purpose? what makes this different than any other loop?
3 odpowiedzi
+ 1
it makes easier. especially for Array otherweise, u need more line:)
0
A "for each" loop is used in normal array, List, Map, Vector.
0
Enhanced for loops are simple. They can be used when you wish to step through the elements of the array in first-to-last order, and you do not need to know the index of the current element.