Ask Question

A finally clause will execute:

a) only if the try statement that precedes it does not throw an exception

b) only if the try statement that precedes it throws an exception that is caught

c) only if the try statement that precedes it throws an exception that is not caught

d) only if the try statement that precedes it throws an exception, whether it is caught or not

e) in any circumstance

+3
Answers (1)
  1. 25 March, 04:07
    0
    e) in any circumstance.

    Explanation:

    It is used in exception handling in Java. Finally clause is used to execute important code such as closing stream, closing connection to the file etc.

    Finally clause is always executed no matter what for every exception handling case.

    for ex:-

    try{

    / / some code

    }

    finally

    {

    //This code will always be execute.

    }
Know the Answer?
Not Sure About the Answer?
Find an answer to your question 👍 “A finally clause will execute: a) only if the try statement that precedes it does not throw an exception b) only if the try statement that ...” in 📗 Computers & Technology if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers