public static void main(String[] args) {
System.out.println(getAns());
}
public static String getAns(){
try{
int a = 1/0;
}catch (Exception e){
return "exception block";
}finally {
return "finally block";
}
}
What should be the answer ??
answer is "finally block" because finally block override the catch block