Is there such case when in try\finally block the finally won't be executed?

后端 未结 4 1906
日久生厌
日久生厌 2020-12-07 00:49

I\'m studying for my test in Object Oriented Programming and I was wondering if there is any case what so ever that considering the following code:

try {
            


        
4条回答
  •  一向
    一向 (楼主)
    2020-12-07 01:25

    If you call System.exit(0) in the try. Or make something that makes the JVM quit or hang (like a deadlock). Otherwise - no.

提交回复
热议问题