I have a simple doubt. In the following two codes, in first return
statement is placed inside a finally
block
public int method1(){
try{
// Some Stuff
} catch(Exception e){
e.printStackTrace();
} finally{
return 0;
}
}
And in second return
statement is placed as normal
public int method1(){
try{
// Some Stuff
} catch(Exception e){
e.printStackTrace();
} finally{
}
return 0;
}
Is there any difference between these two? And which can be used as better option? why?