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

Answers were Sorted based on User's Feedback



What is Exception handling in Java How do you handle run time errors please explain with an examp..

Answer / 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

What is Exception handling in Java How do you handle run time errors please explain with an examp..

Answer / edward sudhahar chennai

Exception handling is a mechanism to handle unexpected
situations in java. This avoids the program to be
terminated upnormaly.

Is This Answer Correct ?    4 Yes 0 No

Post New Answer

More Core Java Interview Questions

What is a parameter in simple terms?

0 Answers  


What is jit and its use?

0 Answers  


I want to store more than 10 objects in a remote server? Which methodology will follow?

0 Answers  


Explain the relationship between the Canvas and Graphics class?

1 Answers  


What are the differences between Java 1.0 and Java 2.0?

0 Answers  


What is the difference between preemptive scheduling and time slicing?

0 Answers  


What are the uses of java?

0 Answers  


Why is java so important?

0 Answers  


How do you check if a number is a perfect square?

0 Answers  


How to call static method?

4 Answers   Epoch,


Is void a data type in java?

0 Answers  


What are inner classes or non static nested classes in java?

0 Answers  


Categories