Exam 13: Exception Handling: A Deeper Look

arrow
  • Select Tags
search iconSearch Question
flashcardsStudy Flashcards
  • Select Tags

When an exception occurs,the try block _______.

Free
(Multiple Choice)
4.8/5
(38)
Correct Answer:
Verified

A

There must be a catch clause for every expected exception type.

Free
(True/False)
4.7/5
(38)
Correct Answer:
Verified

False

The finally block is an ideal location for code that releases resources to prevent "resource leaks."

Free
(True/False)
4.8/5
(34)
Correct Answer:
Verified

True

Each Exception should have three constructors: A default constructor,one that receives a string,and one that receives a string and an exception.

(True/False)
4.8/5
(32)

Which of the following is false regarding the throw point of an exception

(Multiple Choice)
4.9/5
(30)

After an exception has occurred and a stack trace has been printed,the program may exit or continue executing,depending on the circumstances.

(True/False)
4.9/5
(28)

The base class for all exception classes is System.Exception.

(True/False)
4.8/5
(32)

Runtime exceptions can usually be fixed by eliminating coding errors.

(True/False)
4.8/5
(31)

Consider the following code segment: { Var exampleObject = new ExampleClass(); Try { ExampleObject.SomeMethod(); } Finally { If (exampleObject != null) { ExampleObject.Dispose(); } } } Which of the following using statements is equivalent to the preceding code segment

(Multiple Choice)
4.8/5
(40)

In order to display the error message generated by an exception,you use:

(Multiple Choice)
4.9/5
(33)

The constructor method for an exception class should be overloaded to allow the customizing of the display message.

(True/False)
4.7/5
(36)

Which of the following statements is true

(Multiple Choice)
4.8/5
(36)

Exceptions can occur:

(Multiple Choice)
4.9/5
(29)

Which of the following statements is false

(Multiple Choice)
4.8/5
(37)

Programmer-defined exception classes typically should contain 3 constructors:

(Multiple Choice)
4.8/5
(37)

Exception handlers typically access objects in their try blocks to deter mine the causes of the exceptions.

(True/False)
4.9/5
(34)

An exception is:

(Multiple Choice)
4.8/5
(32)

In C#,after an exception is handled,control resumes.This is known as the model of exception handling.

(Multiple Choice)
4.8/5
(30)

Which of the following statements is false

(Multiple Choice)
4.9/5
(40)

Which of the following statements is false

(Multiple Choice)
5.0/5
(34)
Showing 1 - 20 of 58
close modal

Filters

  • Essay(0)
  • Multiple Choice(0)
  • Short Answer(0)
  • True False(0)
  • Matching(0)