Ask Question
30 January, 11:30

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

+1
Answers (1)
  1. 30 January, 15:11
    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 and Technology if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers