Excption Handling-Interview Quetion
Excption Handling-Interview Quetion
What is Exception?
In our application, there are chances of abnormal condition, normal flow of program get
disturbed, such situation is called as an exception.
All types of exceptions only occurs at runtime.
So avoiding such abnormal termination we need to handle exception.
Exception will occur because of wrong user input.
}
}
finally {
}
We cannot write two or more “finally” block for one “try” block, only one “finally” block can be written
with “try” block.
We cannot write “finally” block before “catch” block, we can write it only after “catch” block like try-
catch-finally.