java Api provided try catch finally ,try catch(its ok) but why try finally and exception occured at try then how the flow is?
Answer / vandana singh
If you want to do a task that must be perform with every situation when exception occurs or not. that you should write the code for this in finally block. cause finally block execute in both situation exception occurs or not.
if an exception occurs then catch block statements execute after that control transfer to finally block.
if any exception not occurs than control transfer to finally block.
Is This Answer Correct ? | 25 Yes | 0 No |
Can a singleton class be inherited?
what is stringtolennizer with example?
how to execute main()
How is java created?
what is the purpose of method overriding in java where v r completely re-defining a inherited method instead y can't v create a new method and define.If the question is very silly plz excuse me and do reply.Thank U!
7 Answers emc2, Kumaran Systems,
In what circumstances, compiler will supply a default constructor for a class?
What does escaping a character mean?
How many types of gc are there in java?
Difference between static binding and dynamic binding?
Is finalize() similar to a destructor?
What is collection api?
What is scope & storage allocation of global and extern variables? Explain with an example