"My IDE does't execute any program which involve loops"
I find that extremely difficult to believe! How do you know that?
Put a breakpoint on the line
int j = 2;
Run your program.
When it gets to the breakpoint, execution will stop.
You can then single step through your program, looking at the variables as you go, and following what happens.
I think you will find that the loops are executed...