Java für
for (int i = 0; i < 5; i++) {
System.out.println(i);
}
Clear Camel
for (int i = 0; i < 5; i++) {
System.out.println(i);
}
int[] numbers =
{1,2,3,4,5,6,7,8,9,10};
for (int item : numbers) {
System.out.println(item);
}
//For Loop in Java
public class ForLoops
{
public static void main(String[] args)
{
for(int x = 1; x <= 100; x++)
{
//Each execution of the loop prints the current value of x
System.out.println(x);
}
}
}
for (int i = 0; i < 5; i++) {
System.out.println(i);
}
for(int i = 0; i < 5; i++){
System.out.println(i);
}
for(initialization; booleanExpression; update) {
//statements
} //end for loop