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
What is integer parseint?
Does substring start with 0?
What about features of local inner class?
Explain different types of wrapper classes in java?
What is unicode with example?
What is consumer interface?
Can we call virtual funciton in a constructor ?
Can you pass by reference in java?
Difference between string, string builder, and string buffer?
What is getkey () in java?
who can i handle multiple client in RMI
What is jagged array in java?
What is the basic concepts of OOPS?
What is the difference between post and put?
Break statement can be used as labels in java?