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 finally in exception handling?

Answer Posted / rizwana

The finally keyword can be used to provide a block of code
that is performed regardless of whether an exception is
signaled or not. The syntax is:
try
{
// tested statement(s);
}
catch (ExceptionName e1)
{
// trap handler statement(s);
}
catch (ExceptionName e2) // any number of catch statements
{
// display exception to screen
System.out.println("Exception: " + e2);
}
finally
{
// always executed block
}

Is This Answer Correct ?    6 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What restrictions are placed on method overriding in java programming?

1002


Explain illegalmonitorstateexception and when it will be thrown?

1101


What is linkedlist in java?

1001


Is there a jre for java 11?

1092


Does a class inherit the constructors of its superclass in java programming?

1114


What does snprintf return?

1000


Which class cannot be a subclass in java?

1022


What is the difference between a synchronized method and a synchronized block?

1072


What do you mean by constructor?

981


Define linked list and its features with signature?

1001


Can an interface have a class?

1002


Give reasons supporting that string is immutable.

942


Can a class be private in java?

993


how is final different from finally and finalize in java?

1056


What are the new features in java 8?

1020