if i++ = 11, this will end the for loop , but I am confused why i = 11 will be stored and printed out at the next println
public class kkk {
public static void main(String args[]) {
int i;
for (i = 1; i < 11; i++) {
if (i > 5)
continue;
System.out.println(i);
}
System.out.println(i);
}
}

i++is 11, it doesn't mean thatiwont be updated to 11, it just ends the loop. Also you have println outside for loop which prints 11!i == 11you end the loop, no surprise that after the loop,i == 11.ineed to be incremented to11to give the conditioni<11afalse. So it seems legit that it will keep it value. The for loop don't reverse the last incremental block before exiting it. It would be messy