MyClass.java
 

public class MyClass {
  public static void main(String[] args) {
    for (int i = 0; i <= 10; i = i + 2) {
      System.out.println(i);
    }  
  }
}

Result:
0
2
4
6
8
10