I need a way to break from the middle of try/catch block without throwing an exception. Something that is similar to the break and continue in for loops. Is this possible?
In this sample in catch block i change the value of counter and it will break while block:
class TestBreak { public static void main(String[] a) { int counter = 0; while(counter<5) { try { counter++; int x = counter/0; } catch(Exception e) { counter = 1000; } } } }k