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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

try block

A

The code to be monitored for exceptions will be kept in this block.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

catch block

A

If any exceptions occurred in try block, those exceptions will be caught by this block.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

finally block

A

This block will be always executed whether exception is raised or not and raised exceptions are caught or not.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Complete Exceptions in Java

A

https://javaconceptoftheday.com/java-exception-handling-interview-questions-and-answers/

How well did you know this?
1
Not at all
2
3
4
5
Perfectly