public class
Test {
public static
String output ="";
public static String foo(int i) {
try{
if(i==1) {
throw new Exception();
}
output += "1";
}
catch(Exception e) {
output += "2";
return output; }
finally {
output += "3";
}
output += "4";
//return output;
}
public static void main(String args[]) {
foo(1);
System.out.println("The output after foo(1) is:"+output);
}
}
here code goes go catch block..i just wanted to know tht can't we put
return statement in catch block rather than after finally Please sorry if it is inane question