Professional Documents
Culture Documents
Ans: Exception is an abnormal condition .it occurs during the program execution and disrupts the
normal flow of program.
2) How the exceptions are handled in java? OR Explain exception handling mechanism in
java?
Finally block is always executed whether exception occurred in the try block or not and occurred
exception is caught in catchblock.
Checked unchecked
it doesn’t allow modifications of a collection while It’s allow modifications of a collection while iterating
These iterators
modified while iterating over it. collection is modified while iterating over it.
They use original collection to traverse over the They use copy of the original collection to traverse over