In Java, there are three forms of loop statements:
The while loop would be sufficient to express all loops that can be expressed with for or do. In certain situations, however, it is more convenient to develop an algorithm that makes use of the other types of loop.