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 |
What happens when heap memory is full?
Hai all I want to print given array in reverse order Ex: int a[]={1,2,3,4,5};display this array in reverse order.
What do you mean by ordered and sorted in collections in java?
What are the characteristics of java?
What is use of static in java?
What is flush buffer?
Can an interface be defined inside a class?
what is j2se
What is the super void?
What is the difference between member variables initialization and assignment in a constructor?
List types of storage classes in java?
Differentiate between == and equals().