Java Programming/Keywords/do

From Wikibooks, open books for an open world
Jump to navigation Jump to search

do is a Java keyword.

It starts a do-while looping block. The do-while loop is functionally similar to the while loop, except the condition is evaluated after the statements execute


Computer code
do {
} while (condition);

For example:

Computer code
do {
} while ( i < maxLoopIter );

See also: