Exceptions Flashcards

1
Q

Why does Java need exceptions? Does it?

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

Give an example of two exceptions thrown by Java libraries.

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

How are exceptions modeled? Can I create my own?

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

Talk about the keywords try, catch, and throw.

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

Is it possible to execute two catch blocks from one exception in a try/catch declaration?

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

What does the finally keyword do?

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

Does Java require us to catch exceptions if they might be thrown?

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

What is a checked exception? An unchecked exception? How can I tell one from the other?

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

If I call a method that might throw a checked exception and I don’t want to catch it, what must I do?

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