Exam 9: Exception Handling
Exam 1: Getting Started45 Questions
Exam 2: Console Input and Output29 Questions
Exam 3: Flow of Control44 Questions
Exam 4: Defining Classes I45 Questions
Exam 5: Defining Classes II46 Questions
Exam 6: Arrays46 Questions
Exam 7: Inheritance43 Questions
Exam 8: Polymorphism and Abstract Classes43 Questions
Exam 9: Exception Handling45 Questions
Exam 10: File IO46 Questions
Exam 11: Recursion44 Questions
Exam 12: Uml and Patterns22 Questions
Exam 13: Interfaces and Inner Classes32 Questions
Exam 14: Generics and the Arraylist Class32 Questions
Exam 15: Linked Data Structures43 Questions
Exam 16: Collections,maps,and Iterators44 Questions
Exam 17: Swing I37 Questions
Exam 18: Swing II31 Questions
Exam 19: Java Never Ends26 Questions
Exam 20: Applets25 Questions
Select questions type
Try blocks contain code that could possibly:
Free
(Multiple Choice)
4.8/5
(37)
Correct Answer:
B
Write a Java statement that throws a new exception with the String: Disk drive not ready.
Free
(Essay)
4.7/5
(43)
Correct Answer:
throw new Exception"Disk Drive Not Ready!");
The finally block contains code to be executed whether or not an exception is thrown in a try block.
Free
(True/False)
4.8/5
(48)
Correct Answer:
True
Write a Java statement that throws a new exception with the String: File Not Found.
(Essay)
4.8/5
(36)
Revise the program in number 9 above to throw a NegativeNumberException if the user enters a negative number.
(Essay)
4.9/5
(38)
Revise the program in number 8 above to use a try/catch block to handle the IOException.
(Essay)
4.8/5
(45)
When defining your own exception class,you extend an existing exception class.This is an example of:
(Multiple Choice)
4.9/5
(39)
Which circumstance is an exception to the catch or declare rule?
(Multiple Choice)
5.0/5
(32)
Exceptions that must follow the Catch or Declare Rule are often called unchecked exceptions.
(True/False)
4.9/5
(30)
A _________ block executes regardless of whether an exception occurs.
(Multiple Choice)
4.8/5
(36)
Exceptions that are subject to the catch or declare rule are called:
(Multiple Choice)
4.8/5
(39)
Exception handling is an example of a programming methodology known as:
(Multiple Choice)
4.9/5
(38)
Use a catch block to display the exception thrown in number one above.
(Essay)
4.7/5
(43)
Showing 1 - 20 of 45
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)