I'm writing a loop that ignored the Exception and it works well.
for (; flag; ) {
try {
//do something ignore exception.
Runnable r = queue.pollFirst();
r.run();
} catch (Exception ignored) {
// ignored.
}
}
But my question is: If I don't catch RuntimeException and force continue loop in finally block, what will happen to the Exception and returned value?
Example:
for (int i = 0; i < 10; i++) {
try {
System.out.println(i);
throw new RuntimeException();
} finally {
//what will happen to the exception if continue loop?
continue;
}
}