Hi, What is the use of break statement
Hi,
The break statement is used in a multiple loop statements like the switch or do while statements. It terminates immediately and program control moves to the next statement following the loop.
It is useful when there are many conditions to be evaluated and once there is a match the loop can be skipped proceeding to the next execution code in the program instead of evaluating all conditions.
Hope this helps.
brought to you by enabling practitioners & organizations to achieve their goals using: