Exceptions, Try, catch, finally Flashcards
1
Q
How the exceptions are handled in java?
A
Java has it’s own mechanism to handle the exceptions. In Java, exceptions are handled using three blocks – try, catch and finally blocks.
2
Q
try block
A
The code to be monitored for exceptions will be kept in this block.
3
Q
catch block
A
If any exceptions occurred in try block, those exceptions will be caught by this block.
4
Q
finally block
A
This block will be always executed whether exception is raised or not and raised exceptions are caught or not.
5
Q
Complete Exceptions in Java
A
https://javaconceptoftheday.com/java-exception-handling-interview-questions-and-answers/