I saw this bit of code on the interents somewhere. I'm wondering what the do
is for.
public class LoopControl {
public static void main(String[] args) {
int count = 0;
do {
if (count % 2 == 0) {
for (int j = 0; j < count; j++) {
System.out.print(j+1);
if (j < count-1) {
System.out.print(", ");
}
}
System.out.println();
}
count++;
}
while (count <= 5);
}
}
By which I mean what exactly does do
mean? What's its function? Any other information would be useful, too.