Enhanced For Loop 07-23-2014, 11:22 PM
#1
hey i can understand the for Loop really well but i never unrstood how the Enhanced For Loop works !!
public static void main(String[] args){
int[] numbers =
{1,2,3,4,5,6,7,8,9,10};
for (int item : numbers) {
System.out.println("Count is: " + item);
}
here's and example i know what this code do but i don't know the logic how it works !!
(int item : numbers)i need to know how this work pls !!
@Riverclawz thank you for helping me figure out ho it works on irc i appreciate it !!
pls feel free to close this thread !!
public static void main(String[] args){
int[] numbers =
{1,2,3,4,5,6,7,8,9,10};
for (int item : numbers) {
System.out.println("Count is: " + item);
}
here's and example i know what this code do but i don't know the logic how it works !!
(int item : numbers)i need to know how this work pls !!
@Riverclawz thank you for helping me figure out ho it works on irc i appreciate it !!
pls feel free to close this thread !!
(This post was last modified: 07-23-2014, 11:41 PM by LordPankake.)




![[+]](https://sinister.li/images/modern/collapse_collapsed.png)
![[Image: OilyCostlyEwe.gif]](http://fat.gfycat.com/OilyCostlyEwe.gif)















![[Image: 7ajmN5P.jpg]](https://i.imgur.com/7ajmN5P.jpg)