public class FinallyDemo {
public static void main(String [] args ) {
System .out. println(method (10, 5));
}
private static int method(int a, int b) {
try {
int c =a/ b;
return c;
} catch (Exception e) {
e .printStackTrace() ;
}finally{
System .out.println ("finally语句块被执行!");
return 10;
}
}
}