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
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 |
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 |
What is an eror in java?
What are the two ways of implementing multi-threading in java?
when to for abstract class and when to go for interface
what methods would you overwrite in java.lang.object class?
Is java se open source?
How do you use compareto in java?
What is a function easy definition?
What does pointer mean?
What is the difference between multitasking and multithreading in Java
0 Answers Sans Pareil IT Services,
Is null in java?
What is meant by throwing an Exception?
What is meant by object?