What is "finally" keyword?

Answer Posted / k.santosh kumar

Finally:
finally is block of code written in exception handling.
finally block is executed irrespective whether exception as
occured or not. it will usefull when u want to close user
defined resources like file , opened resources(db stmts).

Is This Answer Correct ?    25 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Objects or references which of them gets garbage collected?

538


Is zero a natural number?

572


Can java object be locked down for exclusive use by a given thread?

589


What is flush () in java?

560


Explain about exception propagation?

589






What is abstraction in java?

621


Can memory leak happen java?

598


Difference between Preemptive scheduling vs. Time slicing?

577


Realized?

1666


Is it necessary for the port addresses to be unique? Explain with reason.

579


Why can't we make a class private in java?

539


What is get () in java?

574


Explain the importance of join() method in thread class?

646


When a thread is executing synchronized methods , then is it possible to execute other synchronized methods simultaneously by other threads?

573


What is the use of set in java?

614