Exam 11: Exceptions and Advanced File Io

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

In a try/catch construct, after the catch statement is executed __________.

(Multiple Choice)
4.8/5
(87)

The ability to catch multiple types of exceptions with a single catch clause is known as multi-catch and was introduced in Java 7.

(True/False)
4.9/5
(86)

Unchecked exceptions are those that inherit from the __________.

(Multiple Choice)
4.8/5
(83)

The call stack is an internal list of all the methods that are currently executing.

(True/False)
4.8/5
(73)

When using the throw statement, if you don't pass a message to the exception object's constructor, then __________.

(Multiple Choice)
4.8/5
(76)

Beginning with Java7, to catch multiple exceptions with a single catch, you can use __________.

(Multiple Choice)
4.9/5
(84)

All exceptions are instances of classes that extend the __________ class.

(Multiple Choice)
4.8/5
(77)

When catching multiple exceptions that are related to one another through inheritance you should handle the more general exception classes before the more specialized exception classes.

(True/False)
4.8/5
(72)

If the code in a method can potentially throw a checked exception, then that method must __________.

(Multiple Choice)
4.9/5
(83)

If you want to append data to an existing binary file, BinaryFile.dat, which of the following statements would you use to open the file?

(Multiple Choice)
4.8/5
(79)

In a try statement, the try clause must appear first, followed by all of the catch clauses, followed by the optional finally clause.

(True/False)
4.9/5
(90)

A class must implement the Serializable interface in order for the objects of the class to be serialized.

(True/False)
4.9/5
(85)

Classes that inherit from the Error class are for exceptions that are thrown when __________.

(Multiple Choice)
4.7/5
(92)

The following catch statement can __________. catch (Exception e) {...}

(Multiple Choice)
4.9/5
(89)

When the code in a try block may throw more than one type of exception, you need to write a catch clause for each type of exception that could potentially be thrown.

(True/False)
4.9/5
(72)

The RandomAccessFile class treats a file as a stream of __________.

(Multiple Choice)
4.7/5
(75)

The try statement may have an optional __________ clause which must appear after all of the catch clauses.

(Multiple Choice)
4.9/5
(88)

When writing a string to a binary file or reading a string from a binary file, it is recommended that you use __________.

(Multiple Choice)
4.9/5
(71)

A(n) __________ is an object that is generated in memory as the result of an error or an unexpected event.

(Multiple Choice)
4.9/5
(74)
Showing 41 - 59 of 59
close modal

Filters

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