int j = 0; for (;;){ System.out.println(j); j++; if (j > 4 ){ break; } }