When finally clause is executed?

Answers were Sorted based on User's Feedback



When finally clause is executed?..

Answer / debapriya patra

A finally clause will execute always wheather the try block
throw any exception or not.

Is This Answer Correct ?    4 Yes 0 No

When finally clause is executed?..

Answer / dinesh

Finally clause is used to handle an exception that is not
caught by any of the previous catch statements.Finally
block can be used to handle any exception generated within
a try block.It may be added immediately after the try block
or after the last catch block.When a finally block is
defined,this is guranteed to execute,regardless of whether
or not an exception is thrown.used in house-keeping
operations like closing files and releasing system
resources.

Is This Answer Correct ?    3 Yes 0 No

When finally clause is executed?..

Answer / sushant

This is a block which provide gurantee about the particular
code execution, whether there is exception or not.

Is This Answer Correct ?    2 Yes 1 No

Post New Answer

More Core Java Interview Questions

What do you understand by private, protected and public?

0 Answers  


What is Generic in java? Where can we write Generic ( class or method or objects or etc...)? with simple example? Thanks, Bose.

2 Answers   Infosys, Tech Mahindra,


What is the common usage of serialization? What exceptions occur during serialization?

0 Answers  


What about member inner classes?

0 Answers  


How to sort an array from smallest to largest java?

0 Answers  






How many bytes are a float?

0 Answers  


what are the different non-access specifiers in java?

5 Answers  


What is proper subset?

0 Answers  


How do I remove a character from a string in java?

0 Answers  


Which access specifier can be used with class ?

0 Answers  


What is java life cycle?

0 Answers  


How can we create a thread in java?

0 Answers  


Categories