Enhanced For Loop
int[] numbers = {1,2,3,4,5};
for (int number: numbers) {
System.out.print(number);
}
// Outputs: 12345
Used to loop around array's or List's
Comments
int[] numbers = {1,2,3,4,5};
for (int number: numbers) {
System.out.print(number);
}
// Outputs: 12345
Used to loop around array's or List's