what are the rules to use try catch finally?
Answer / naveen
Rules to using try catch finally blocks.
First thing is try,catch and finally blocks are used in
Exception Handling.In try block we are write Exception
rising code in catch block using exception handling code and
finally block is used to releasing the resource. try and
catch blocks are executed are not finally block is executed.
we are using this combination
try{
//Exception rising Code
}catch(Exception e){
}finally{
//releasing the resource
}
2)
try{
//Exception rising Code
}catch(Exception e){
}
3)try{
//Exception rising Code
}finally{
//releasing the resource
}
Is This Answer Correct ? | 11 Yes | 0 No |
How to change the priority of thread or how to set priority of thread?
what is the reason behind non static method cannot be referenced from a static Context?
What is polymorphism and what are the types of it?
What is java virtual machine? Explain
What modifiers may be used with an inner class that is a member of an outer class in java programming?
Why string is called as immutable?
What is the driver class?
What are the basic concepts of OOPS in java?
0 Answers Axtria, ITC Indian Tobacco Company,
Can we pass a primitive type by reference in java? How
Explain an algorithm to find depth of a binary tree.
0 Answers Akamai Technologies,
Is there any need to import java.lang package?
What is palindrome in java?