Exam 10: Exceptions

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

What are the standard I/O streams?

(Short Answer)
4.9/5
(48)

Which of the following exception types must always be caught unless they are contained in methods that throw them in the method header?

(Multiple Choice)
4.9/5
(34)

What is exception prorogation, and how does it work in Java?

(Essay)
4.8/5
(38)

What is a catch clause?

(Essay)
4.8/5
(38)

Which of the following file streams should be explicitly closed to ensure that written data is properly retained?

(Multiple Choice)
4.8/5
(42)

Unchecked exceptions must be caught or propogated, or a program will not compile.

(True/False)
4.8/5
(35)

The Exception class and the Error class are subclasses of the ___________________ class.

(Multiple Choice)
4.8/5
(41)

A(n) ____________________ is used to specify how certain exceptions should be handled.

(Multiple Choice)
4.9/5
(35)

Is the Exception class a subclass of the Error class? Explain.

(Short Answer)
4.7/5
(38)

Attempting to divide by zero will result in an Error being thrown, not an Exception.

(True/False)
4.8/5
(30)

The _________________ statement is used to begin exception propogation.

(Multiple Choice)
4.9/5
(25)

A(n) _____________________ is an object that defines an erroneous situation from which the program usually cannot recover.

(Multiple Choice)
4.8/5
(41)

The getMessage method of the Exception class prints out the stack trace, which helps the user to track down the source of the exception.

(True/False)
4.8/5
(40)

If an exception is not caught, a program will __________________________ .

(Multiple Choice)
4.9/5
(29)

What is a try block?

(Essay)
4.8/5
(34)

In practice, it is important to catch all exceptions that might be thrown by a program.

(True/False)
4.8/5
(38)

A(n) ________________ is an ordered sequence of bytes.

(Multiple Choice)
4.8/5
(35)

A finally clause is always required in a try-catch block.

(True/False)
4.7/5
(31)

A(n) ____________________ can be used to find the exact line where an exception was thrown during program execution.

(Multiple Choice)
4.7/5
(40)

How is a finally clause different from a try block and a catch clause?

(Short Answer)
4.8/5
(41)
Showing 21 - 40 of 40
close modal

Filters

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