Computer Science, asked by nikitasharma59, 1 year ago

Can anyone pls explains the while(true) construct in java?

Answers

Answered by akshayegreat
1
It might be worth adding that the construct should generally be avoided, as it usually involves the loop containing break statements, which are also best kept to a minimum.

It IS sometimes used when all the conditions for ending the loop are difficult to put into a single expression, or when they only become apparent over a series of statements, but it can make path testing quite difficult.

Similar questions