Chapter 7 Flashcards

1
Q

What are types of errors

A

Syntax error
Logical error
Run time error

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

What is the difference between error and exception

A

Error can not be recovered and exception can be recovered and handle

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

Is exception an object in java

A

Yes

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

What are 2 types of exceptions in java

A
Checked exceptions (compiler force us to write code for that exceptions)
Unchecked exceptions (compiler do not force us to write code for that exceptions)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

In which category run time exceptions falls

A

Unchecked exceptions

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

In which category IO Exceptions fall

A

Checked exceptions

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

Does finally block in exceptions always execute

A

Yes

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

What is the order of multiple catch blocks

A

Top should be child and parent towards bottom

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

Which keyword is used to send exception to another method

A

throw

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