I have a While loop, and a try catch block within it. How can i add a break statement in the catch statement to break the while loop. I don't want to use a DO-WHILE loop because i just have a few minutes to submit my code, and i don't want to break the program by making the change. But, later on i will consider changing the code using a DO-WHILE statement.
while (true) {
try {
// something here
} catch (Exception e) {
// I need to break the forever while loop here
}
}