M11: Quiz 11

Ace your homework & exams now with Quizwiz!

T/F: An exception object and an Error object are the same thing when thrown during runtime.

False

T/F: Java allows you to create your own exception by extending the Exception class or one of its subclasses, which is useful when there is NOT an appropriate exception in the Java API.

True

The difference between a checked and an unchecked exception is that BLANK. (Select all that apply) a. A checked exception must be caught or listed in the throws clause of any method that may throw or propagate it. b. A checked exception inherits from RuntimeException and its descendants. c. An unchecked exception must be caught or listed in the throws clause of any method that may throw or propagate it. d. An unchecked exception inherits from RuntimeException and its descendants. e. None of the above.

a. A checked exception must be caught or listed in the throws clause of any method that may throw or propagate it. d. An unchecked exception inherits from RuntimeException and its descendants.

Which of the following statements is/are true about an unchecked exception? (Select all that apply) a. An unchecked exception can be encountered even without using try-catch blocks. b. An unchecked exception can be encountered even without using a throws clause. c. An unchecked exception does not require the program to handle it. d. An unchecked exception can be encountered only by using a throws clause. e. An unchecked exception can be encountered only by using try-catch blocks.

a. An unchecked exception can be encountered even without using try-catch blocks. b. An unchecked exception can be encountered even without using a throws clause. c. An unchecked exception does not require the program to handle it.

Which of the standard I/O streams is used to print to the console (e.g. Run I/O tab in jGRASP)? a. System.in b. System.out c. System.err d. System.exception e. None of the above

b. System.out


Related study sets

Passpoint immobility and pain & powerpoint questions

View Set

ATI Nursing care of Children Practice B

View Set

Semester 1 Review - Key Terms and Concepts

View Set

Business Law, 8e (Cheeseman) Chapter 13 Genuineness of Assent and Undue Influence

View Set