+ 2

what are enhaced for loop

i ran into a quetion while taking shircut now i cant find any info

20th Jun 2017, 1:18 PM
vivek sachan
vivek sachan - avatar
2 Réponses
+ 11
@ValentineHacker he is asking for java so correct method is for(int a : b) {} where b may be integer array
20th Jun 2017, 1:35 PM
Vaibhav Sharma
Vaibhav Sharma - avatar
+ 15
for (int a in b) { //code } //called enchanted or forEach loop... Used to iterate through arrays/objects ....
20th Jun 2017, 1:23 PM
Valen.H. ~
Valen.H. ~ - avatar