The finally clause of the try-catch-finally statement is always executed unless the thread of execution terminates or an exception occurs within the execution of the finally clause.:The finally clause will always will be executed even if try block or catch block throws an exception, but if we mention System.exit() in try block or catch block , then finally will not be getting executed.
Category:Java Interview Questions
No comments:
Post a Comment