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

Why object class is super class for every class in java?

1027


what is the purpose of using rmisecuritymanager in rmi?

968


What is class forname used for?

1047


Describe string intern() methodology

1059


What are data structures in java?

976


Can we declare array without size in java?

1037


How are observer and observable used in java programming?

1027


What is boolean law?

1063


Why main method is called first in java?

1010


What is ide with example?

967


What is the use of optional ?

1033


Why can't we make a class private in java?

1035


Is map ordered in java?

946


What steps are taken when the OS shifts from one-thread execution to another?

1365


Why is the type for real numbers called double?

959