If for some reason you don't want to use the break instruction (if you think it will disrupt your reading flow next time you will read your programm, for example), you can try the following :
boolean test = true;
for (int i = 0; i < 1220 && test; i++) {
System.out.println(i);
if (i == 20) {
test = false;
}
}
The second arg of a for loop is a boolean test. If the result of the test is true, the loop will stop. You can use more than just an simple math test if you like. Otherwise, a simple break will also do the trick, as others said :
for (int i = 0; i < 1220 ; i++) {
System.out.println(i);
if (i == 20) {
break;
}
}