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 “try and catch” in java

Answer Posted / lakshay gupta

The statements within the try block are executed, and if any
of them throws an exception, execution of the block is
discontinued and the exception is handled by the catch
block. There may be multiple catch blocks, in which case the
first block with an exception variable whose type matches
the type of the thrown exception is executed.
If no catch block matches the type of the thrown exception,
the execution of the outer block (or method) containing the
try ... catch statement is discontinued, and the exception
is passed up and outside the containing block (or method).
The exception is propagated upwards through the call stack
until a matching catch block is found within one of the
currently active methods. If the exception propagates all
the way up to the top-most main method without a matching
catch block being found, a textual description of the
exception is written to the standard output stream.

Is This Answer Correct ?    5 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why vector class is used?

1034


What is java used for on a computer?

1035


What is the difference between static and global variables and also define what are volatile variables?

1105


What is a key in java?

1021


Why is an interface be able to extend more than one interface but a class can’t extend more than one class?

1219


Explain enumeration in java?

1049


How can we make sure main() is the last thread to finish in java program?

1256


Do I need java on my computer?

1022


What is an empty string in css?

1101


What is a predicate method?

1064


How do you use parseint in java?

1030


What technique is carried out to find out if a particular string is empty?

1061


how to run ecllipse with jettyserver for windows environment using batch file

2147


What is bool mean?

1141


How to find the largest value from the given array.

1066