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 |
How many classes can any class inherit java?
how cani read a command line argument?(usingfile object).
What is an infinite loop in java? Explain with an example.
how to prepare for IT Officers Interview in Banks
0 Answers TATA, Tata Steel Limited,
When should the method invokelater() be used?
Can we override private constructor in java?
Explain different types of thread priorities ?
How do you sort data in java?
String class is defined under which package in java?
What does s mean in regex?
Given a singly linked list, how will you print out its contents in the reverse order? Can you do it with consuming any extra space?
0 Answers Akamai Technologies,
How do u pass data from one jsp to another jsp?