6.1 do statement

Do statement is another Java's looping construct. It is Java's three repetitive control structures.

int k = 0;
do {
  k = k + 1;
  System.out. println(k);
}
while (k < 5);

你可能感兴趣的:(6.1 do statement)