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 ? | 26 Yes | 0 No |
What is singleton class?
16 Answers 3i Infotech, 7 Seas, ABC, Amdocs, Cap Gemini, Oracle, Persistent, TCS, Techforza,
all are saying java doesn't support multiple inheritance but by default Object class is super class for all the user defined classes and we can extend atmost one class so each class can extend more than one class so java supports multiple inheritance?i am confused with this,pls any one explain me.
Can a static class have a constructor java?
What is a string what operation can be performed out with the help of a string?
How do you make a thread in java?
What is data object example?
Why we used vector class?
Is void a wrapper class?
How do you convert boolean to boolean?
What are inner classes or non static nested classes in java?
when we create singleton design then we create private constructtor..so how JVM take private constructor to make object..but it's private..
What is the default modifier in Interface?