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 Exception handling in Java
How do you handle run time errors please explain with an
example

Answer Posted / uv

Exceptions are handled by using "try","catch" and "finally"
block in the program.
The part of code which is suspected to give an exception is
kept under try block.
The exception is then been caught by the "catch" block. In
this way, we can avoid the abnormal termination of the
program and can also display some user friendly messages
which could guide them on how to refrain from exceptions.

finally block contains the code which is necessary to
execute like closing of connections established with
database while running the application.
finally block is always executed irrespective of the
exception.

Is This Answer Correct ?    16 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is integer parseint?

993


Does substring start with 0?

987


What about features of local inner class?

1069


Explain different types of wrapper classes in java?

1024


What is unicode with example?

1215


What is consumer interface?

1000


Can we call virtual funciton in a constructor ?

2205


Can you pass by reference in java?

978


Difference between string, string builder, and string buffer?

1108


What is getkey () in java?

1011


who can i handle multiple client in RMI

1898


What is jagged array in java?

1087


What is the basic concepts of OOPS?

1202


What is the difference between post and put?

1066


Break statement can be used as labels in java?

1003