I have a program like this:
public class OCAJP {
public static void main(String[] args) {
int i=0;
for(;i<2;i=i+5) {
if(i<5) {
continue;
}
System.out.print(i);
}
System.out.print(i);
}
}
This gives me an output to be 5 rather than giving me 05.
The continue statement used in if block must not be executing the if block but it shows its functionality to continue the for loop.