Hai to all,can anyone tell me how to stop the execution of finally block explicitly??
Printable View
Hai to all,can anyone tell me how to stop the execution of finally block explicitly??
try {
int a=40,b=0;
int d=a/b;
}catch(Exception e){
System.out.println("Exception: "+e);
System.exit(1);
} finally {
System.out.println("finally");
}
[QUOTE=gayathrikundurthi;32538]Hai to all,can anyone tell me how to stop the execution of finally block explicitly??[/QUOTE]
we can exit from the program or else surely finally will be executed
[QUOTE=gayathrikundurthi;32538]Hai to all,can anyone tell me how to stop the execution of finally block explicitly??[/QUOTE]
u can write in system.exit()
[QUOTE=venkatramanareddy;43165]u can write in system.exit()[/QUOTE]
yes
He is the right