No, break is the correct solution.
Adding a boolean variable makes the code harder to read and adds a potential source of errors.
No, break is the correct solution.
Adding a boolean variable makes the code harder to read and adds a potential source of errors.