public static void main(
String[] args) {
try{
m();
}catch(Exception ex){
System.out.println(" Exception"); //Line 2
}
}
static void m(){
try{
new Exception(); //Line 1
}finally{
System.out.println("Finally");
new Exception(); // Line 3
}
}
}
In Line 1 I am throwing new Exception() didn't catch through any catch block.We in finally block not handing any exception .At Line 2 I have written catch block.But output is
Finally
Even at line 3 new Exception is throwing still output is -- Finally
Please tell me where this exception is handled or how exception flow is happening here.
Thanks