If there was a code under continue
, it'll be a dead code (unreachable code).
The way you wrote it, it has no effect since it's already the last line. The loop would have continued if there was no continue;
.
These two blocks of code have the same effect:
for(int i = 0; i < 10; i++) {
// .. code ..
}
for(int i = 0; i < 10; i++) {
// .. code ..
continue;
}
However, the below snippet has unreachable code:
for(int i = 0; i < 10; i++) {
// .. code ..
continue;
// .. unreachable code ..
}