胡一搏 发表于 2013-8-16 16:20:09

[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:12

No. inthis 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 neverexecutes.
页: [1]
查看完整版本: [Oracle interview]If I write System.exit (0); at the end of the try block, will the finally block still execute?