while (condition) {
code_block
}
Unlike do-while, the while loop checks the Boolean condition statement before the first loop is executed. Consequently, it is possible for the code block to never execute.
Integer count = 1; while (count < 11) { System.debug(count); count++; }