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 is the purpose of the final in the try-catch-final

Answer Posted / guest

finally will execute after catch block if try throw
exception else it will execute after try.

ex:

class a
{
public static void main(String []asd)
{

try
{
throw new Exception();
}catch(Exception e)
{
System.out.println("catch");
}
finally{
System.out.println("finally");
}
}
}

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between length and length () in java?

883


What do you understand by the term singleton?

941


How do you make a thread in java?

1028


What does s mean in regex?

954


What are different types of classloaders?

977


Give me example of derived data types.

1086


How many functional interfaces does java 8 have?

975


What is the difference between serializable and externalizable interfaces?

1025


What is method in java ?

1018


What is an infinite loop? How infinite loop is declared?

1016


How do you override a method?

957


How do you implement singleton class?

926


What is the benefit of abstract class?

891


Explain creating threads by implementing runnable class?

1086


What are Normalization Rules? Define Normalization?

979