while
( more list elements to process )
process the next element
e.g.
int
index;
index = 0;
while
(index < list.size()) {
process list.get(index);
index = index + 1;
}
n
We must guarantee that the
while
condition eventually will become
false.