Exam 9: Exception Handling
Exam 1: Getting Started46 Questions
Exam 2: Console Input and Output29 Questions
Exam 3: Flow of Control43 Questions
Exam 4: Defining Classes I44 Questions
Exam 5: Defining Classes Ii46 Questions
Exam 6: Arrays47 Questions
Exam 7: Inheritance43 Questions
Exam 8: Console Input and Output43 Questions
Exam 9: Exception Handling45 Questions
Exam 10: File IO46 Questions
Exam 12: Uml and Patterns22 Questions
Exam 13: Interfaces and Inner Classes32 Questions
Exam 14: Generics and the Arraylist Class31 Questions
Exam 15: Linked Data Structures43 Questions
Exam 16: Collections and Iterators44 Questions
Exam 17: Swing I37 Questions
Exam 18: Swing II31 Questions
Exam 19: Java Never Ends18 Questions
Exam 11: Recursion43 Questions
Exam 20: Applets25 Questions
Select questions type
ArrayIndexOutOfBoundsException is a descendent of the class RuntimeException.This means:
(Multiple Choice)
4.8/5
(45)
If a method throws an exception,and the exception is not caught inside the method,then the method invocation:
(Multiple Choice)
4.8/5
(37)
Define an exception class called DiskDriveNotReady.The class should have a constructor with no parameters.If an exception is thrown with this zero-argument constructor,getMessage should return "Disk Drive Not Ready!" 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.7/5
(27)
Write a complete Java program that prompts the user for two nonnegative integer numbers.Your program should handle bad input data.
(Essay)
4.7/5
(41)
Exception handling is an example of a programming methodology known as:
(Multiple Choice)
4.9/5
(26)
Revise the program in number 8 above to use a try/catch block to handle the IOException.
(Essay)
4.9/5
(51)
The two most important things about an exception object are its type and the message that it carries in an instance variable of type String.
(True/False)
4.7/5
(31)
A _________ block executes regardless of whether an exception occurs.
(Multiple Choice)
4.8/5
(36)
The compiler does not complain when the catch or declare rule is ignored.
(True/False)
4.8/5
(33)
Revise the program in number 9 above to throw a NegativeNumberException if the user enters a negative number.
(Essay)
4.9/5
(42)
Showing 21 - 40 of 45
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)