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.)
![[Image: blackeagle_zps6ad86521.gif]](http://i1363.photobucket.com/albums/r719/AmazeGotStyle/blackeagle_zps6ad86521.gif)