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 |
When do we use synchronized methods in java?
i need income tax program using java inheritance concept. could u please help me?
What is a default package ?
Why java is free from garbage values??
did interface can implementation method ? i know its not possible but my interviewer said its possible ..but how..? any one have idea ???
What is the benefit of using enum to declare a constant?
Can we create an object if a class doesn't have any constructor ( not even the default provided by constructor ) ?
What do you mean by singleton class in java?
Difference between String and StringBuffer.
How many bits is a 64 bit byte?
How much is a java license?
What is meant by local variable and instance variable?