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 Posted / 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 ? | 26 Yes | 0 No |
Post New Answer View All Answers
What are recursive functions?
is it possible to instantiate the math class?
What are the topics in core java?
What is the java project architecture?
Why are the destructors for base class and derived class called in reverse order when the program exits
What is the use of static methods?
What is difference between null and void?
What are passing parameters?
What is meant by 'Class access modifiers'?
What do heavy weight components mean in java programming?
What does java stand for?
I am unable to find or learn about print command. I have a graphical program in core java in applet but i want to give print command but i have coding for that so if anyone know about this plz mail me on avdhesh_chauhan007@yahoo.co.in
Do extraneous variables affect validity?
When object is created and destroyed?
What is a “stateless” protocol ?