Java Programming

Computing

Quiz 11 :

Handling Exceptions and Events

Quiz 11 :

Handling Exceptions and Events

Question Type
search
arrow
Every program with a try block must end with a finally block.
Free
True False
Answer:

Answer:

False

Tags
Choose question tag
close menu
arrow
The order in which catch blocks are placed in a program has no impact on which catch block is executed.
Free
True False
Answer:

Answer:

False

Tags
Choose question tag
close menu
arrow
The class Throwable is derived from the class Exception.
Free
True False
Answer:

Answer:

False

Tags
Choose question tag
close menu
arrow
When an exception occurs, an object of a particular exception class is created.
True False
Answer:
Tags
Choose question tag
close menu
arrow
The class Object is derived from the class Throwable.
True False
Answer:
Tags
Choose question tag
close menu
arrow
The class Exception and its subclasses are designed to catch exceptions that should be caught and processed during program execution.
True False
Answer:
Tags
Choose question tag
close menu
arrow
Statements that might generate an exception are placed in a catch block.
True False
Answer:
Tags
Choose question tag
close menu
arrow
The methods getMessage and printStackTrace are private methods of the class Throwable.
True False
Answer:
Tags
Choose question tag
close menu
arrow
If you have a reference to an exception object, you can use the reference to throw the exception.
True False
Answer:
Tags
Choose question tag
close menu
arrow
During program execution, if division by zero occurs with integer values and is not addressed by the program, then the program terminates with an error message indicating an attempt to divide by zero.
True False
Answer:
Tags
Choose question tag
close menu
arrow
An unchecked exception is any exception that causes a program to terminate.
True False
Answer:
Tags
Choose question tag
close menu
arrow
Making a reference to an object that has not yet been instantiated would throw an exception from the NullPointerException class.
True False
Answer:
Tags
Choose question tag
close menu
arrow
The class Exception contains two constructors.
True False
Answer:
Tags
Choose question tag
close menu
arrow
The try block contains statements that should be executed regardless of whether or not an exception occurs.
True False
Answer:
Tags
Choose question tag
close menu
arrow
The StringIndexOutOfBoundsException could be thrown by the method parseInt of the class Integer.
True False
Answer:
Tags
Choose question tag
close menu
arrow
If there is a finally block after the last catch block, the finally block always executes.
True False
Answer:
Tags
Choose question tag
close menu
arrow
If an exception occurs in a try block and that exception is caught by a catch block, then the remaining catch blocks associated with that try block are ignored.
True False
Answer:
Tags
Choose question tag
close menu
arrow
A checked exception is any exception checked for by the programmer.
True False
Answer:
Tags
Choose question tag
close menu
arrow
The class RuntimeException is part of the package java.io.
True False
Answer:
Tags
Choose question tag
close menu
arrow
NoSuchElementException is a method of the class Exception.
True False
Answer:
Tags
Choose question tag
close menu
Showing 1 - 20 of 50