wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

PreTrainingExceptions

Total questions: 10

Worksheet time: 11mins

Name
Class
Date
1.

What is the root class that all exceptions extend from?

a)

RuntimeException

b)

Exception

c)

IOException

d)

Error

2.

Exceptions can be handled with a structure called a___

a)

Try/Error

b)

Run/Catch

c)

Try/Catch

d)

Run/Fail

3.

____ should be caught and handled,

but you generally shouldn't attempt to catch ____

a)

checked exceptions,

unchecked exceptions

b)

errors,

runtime exceptions

c)

exceptions,

errors

4.

What is an error?

a)

An abnormal condition from outside of the program that halts execution

b)

An abnormal condition that halts the program exclusively during compilation

c)

An abnormal condition that halts the program exclusively while the program is running

d)

Any abnormal condition that halts execution

5.

What is a Checked Exception?

a)

An abnormal condition from outside of the program that halts execution

b)

An abnormal condition that halts the program exclusively during compilation

c)

An abnormal condition that halts the program exclusively while the program is running

d)

Any abnormal condition that halts execution

6.

What is an Unchecked Exception?

a)

An abnormal condition from outside of the program that halts execution

b)

An abnormal condition that halts the program exclusively during compilation

c)

An abnormal condition that halts the program exclusively while the program is running

d)

Any abnormal condition that halts execution

7.

ArrayIndexOutOfBoundsException is an example of a(n) ____

a)

Checked/Compile time Exception

b)

Error

c)

Unchecked/Run time Exception

8.

Stack Overflow is an example of a(n) ____

a)

Checked/Compile time Exception

b)

Error

c)

Unchecked/Run time Exception

9.

When using multiple catch blocks, you should catch exceptions

from most____ to most____

a)

General, Specific

b)

Specific, General

c)

Common, Rare

d)

Lexicographically small,

Lexicographically large

10.

True/False: Running into a lot of exceptions during development means you're a poor developer

a)

True

b)

False