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

How are the elements of a gridbaglayout organized?

644


Why is stringbuffer faster than string?

584


Explain the difference between comparator and comparable in java?

575


What is object in java?

631


Can a constructor call another constructor?

653






What is the replace tool?

647


Define the term string pool?

674


What is the function of character?

630


a thread is runnable, how does that work? : Java thread

596


Explain the difference between collection api and stream api in java8?

617


What are the important features of Java 10 release?

618


Why do we need wrapper class?

631


What is connection class in java?

594


What are the core java topics?

650


can rmi and corba based applications interact ?

755