What is the purpose of the finally clause?

Answers were Sorted based on User's Feedback



What is the purpose of the finally clause?..

Answer / dhawal

the code block in finally block must be executed if
exception throws or not,except if we write system.exit(0);

Is This Answer Correct ?    4 Yes 0 No

What is the purpose of the finally clause?..

Answer / ranganathkini

The finally clause is used to ensure that a single statement
or a set of statements are executed irrespective of whether
or not an exception is thrown/caught inside a method.

Is This Answer Correct ?    2 Yes 0 No

What is the purpose of the finally clause?..

Answer / ravikiran

finally clause is used to get executed irrespective of the
exception raising inorder to conserve the resources

Is This Answer Correct ?    3 Yes 1 No

Post New Answer

More Core Java Interview Questions

how its run?

1 Answers  


What exactly is methodology?

1 Answers  


Explain listiterator and methods in listiterator?

1 Answers  


Q1.A. Write note on “The class path Environment Variable”? B. Which are different kinds of source code? Q2.A. How to create an interface? B. Why convert an applet to an application? Q3.A. How to use Media tracker Class. B. How to use string tokenizer class. Q4 A. Explain the overview of UDP messaging. B. Difference between SQL Exception class and SQL Warning class. Q5. A. How to create com object in Java? B. Write short notes on “The properties class” Q6. A. When object is created and destroyed? B. Explain the JDB in depth & command line. C. Write short notes on Web Sites.

3 Answers   iGate, Seed Infotech,


Which api is provided by java for operations on set of objects?

1 Answers  


What things should be kept in mind while creating your own exceptions in java?

1 Answers  


What are the two ways of implementing multi-threading in java?

2 Answers  


What is a numeric digit?

1 Answers  


Can You Have Virtual Functions In Java?

1 Answers  


Can we overload final method in java?

1 Answers  


What is string in java? String is a data type?

1 Answers  


Can sleep() method causes another thread to sleep?

1 Answers  


Categories