Can anyone pls explains the while(true) construct in java?
Answers
Answered by
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.
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
Math,
8 months ago
Math,
8 months ago
Computer Science,
8 months ago
Chemistry,
1 year ago
English,
1 year ago