this is the code fragment. I'm not too sure what num%2 is though. % would give the remainder, so does that mean that the remainder of num must be 2?
int num = 1, max = 20;
while (num < max)
{
if (num%2 == 0)
System.out.println(num);
num++;
}