Java – Introduction to Loops
Loop: A Block of instructions execute repeatedly as long the condition is valid. Note: Block executes only once whereas Loop executes until condition become False Java Supports 3 types of Loops: For Loop: We use for loop only when we know the number of repetitions. For example, While loop: We use while loop when we …