Answer the following statements true (T) or false (F)

1) Exceptions always are handled in the method that initially detects the exception.
2) User-defined exception classes should extend class SystemException.
3) Accessing an out-of-bounds array index causes the CLR to throw an exception.
4) A finally block is optional after a try block that does not have any corresponding
catch blocks.
5) A finally block is guaranteed to execute.

1) False. Exceptions can be handled by other methods on the method-call stack.
2 False. User-defined exception classes should typically extend class Exception.
3) True.
4) False. A try block that does not have any catch blocks requires a finally block.
5) False. The finally block executes only if program control enters the corresponding
try block

Computer Science & Information Technology

You might also like to view...

You use the chmod command on a script to change

A. its executable permission bit to true B. its file type to script

Computer Science & Information Technology

How is a spot color identified in the Swatches panel? A mixed ink?

What will be an ideal response?

Computer Science & Information Technology