Learning loops and was wondering if anyone could help me with the theory here,

public static void main(String[] args)

{

int k=0;

for (int j=0; j<=10; j++) {

if (j == 5)

break;

else

k++;

}

System.out.println(k);

}

}

The answer is k will print 5, but I am just learning loops and don't see how. Would it not go, j=0,k=0,j=1,k=1,j=2,k=2,etc, until j=5 and then k remains at 4? Sorry if this is a silly question or out of place but would appreciate the clarification thanks!