What is the purpose of the finally clause?

Answer Posted / ranganathkini

The finally clause is used to ensure that a single statement
or a set of statements are executed irrespective of whether
or not an exception is thrown/caught inside a method.

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is nullpointerexception checked or unchecked?

549


What is the difference between a vector & an array list?

672


What are the important features of Java 10 release?

508


how come we know the object is no more used in the class?

5395


Explain about serializable interface in java?

574






What is object-oriented programming?

563


How many decimal places is a double?

531


Can you run java program without main method?

541


What happens if a try-catch-finally statement does not have a catch clause to handle an exception that is thrown within the body of the try statement?

658


What is private protected in java?

543


What is files manifesting?

1720


What is a super method?

528


what are the disadvantages of indexes in oracle?

1860


What is the base class for error and exception?

547


Explain restrictions on using enum?

624