Exam 9: Exception Handling

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

If a method does not catch an exception,then it must at least warn programmers that any invocation of the method might possibly throw an exception.This warning is called a/an:

(Multiple Choice)
4.9/5
(32)

Exceptions that are subject to the catch or declare rule are called:

(Multiple Choice)
4.7/5
(34)

Define an exception class called FileNotFoundException.The class should have a constructor with no parameters.If an exception is thrown with this zero-argument constructor,getMessage should return "File Not Found!" The class should also have a constructor with a single parameter of type String.If an exception is thrown with this constructor,then getMessage returns the value that was used as an argument to the constructor.

(Essay)
4.8/5
(35)

In event-driven programming,sending an event is called firing the event.

(True/False)
4.8/5
(35)

Write a Java statement that throws a new exception with the String: File Not Found.

(Short Answer)
4.7/5
(35)
Showing 41 - 45 of 45
close modal

Filters

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