标题: [Oracle interview]If I write System.exit (0); at the end of the try block, will the finally block still execute? [打印本页] 作者: 胡一搏 时间: 2013-8-16 16:20 标题: [Oracle interview]If I write System.exit (0); at the end of the try block, will the finally block still execute? 作者: 费庆龄 时间: 2013-8-16 16:25
No. in this case the finally block will not execute because when you say System.exit (0); the control immediately goes out of the program, and thus finally never executes.