What is the basically use of finally while we know it
is always executed but why?
Answer Posted / reshma
Using finally one can close the resources such as file
handler or a database connection. It ia good to maintain
the internal state of an object.
| Is This Answer Correct ? | 13 Yes | 2 No |
Post New Answer View All Answers
What steps are taken when the OS shifts from one-thread execution to another?
What is a ?
How can you add and remove nodes in jtree?
How do you remove duplicates in java?
Can we extend a class with private constructor?
Is array passed by reference in java?
What do you mean by aggregation?
Find the value of a specified element of the array arr[i] where 0 <= i <= n-1
What is the abstract class?
Can singleton class be inherited in java?
Which is fastest collection in java?
What is thread life cycle in java?
Can you explain the meaning of aggregation and composition
Which types of exceptions are caught at compile time?
What access modifiers can be used for variables?