Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


what are the rules to use try catch finally?



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

Post New Answer

More Core Java Interview Questions

What is the difference between sleep and wait in java?

0 Answers  


What about member inner classes?

0 Answers  


How to display all the prime numbers between 1 and n (n is the number, get the input from user)

0 Answers  


Why arraylist is used in java?

0 Answers  


What is canonical name in java?

0 Answers  


What kind of variables a class can consist of?

0 Answers  


Can you give few examples of final classes defined in java api?

0 Answers  


What is the difference between object oriented programming language and object based programming language?

0 Answers  


How concurrent hashmap works?

0 Answers  


What is the difference between public, private, protected, and friend access?

0 Answers   Amazon,


What is the difference between declaration and definition in java?

0 Answers  


Write a program in java to calculate the difference between the sum of the odd level and even level nodes of a binary tree.

0 Answers  


Categories