The ________ statement can be used to prematurely exit a loop based on a particular condition.

  • Break Statement
  • Continue Statement
  • Exit Statement
  • Return Statement
In Java, the "break" statement is used to prematurely exit a loop based on a particular condition. It is commonly used in "for" and "while" loops to exit the loop when a specific condition is met. The other options (2 to 4) have different purposes and are not used for exiting loops.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *