for loop in basic code example Example: simple for loop for(int i =0; i<10; i++){ System.out.println(i); }