posted 24 years ago
Hi,
Try code given below, you will get the logic.
for(int i=0; i<10; ++i)
{
try{
if (i%3==0) throw new Exception ("E");
try{
if (i%3==1) throw new Exception ("E");
System.out.println(i);
}
catch (Exception inner) {i *=2;}
finally {System.out.println(i);++i;}
}
catch (Exception Outer) {i +=3;}
finally {System.out.println(i);++i;}
}
}
---
This is because "finally" will be executed eventhough no exception.
-
rvholla.