Podcast
Questions and Answers
What is an exception in Java?
What is an exception in Java?
- An object that describes an error condition that has occurred in a piece of code (correct)
- A compile-time error
- A constraint of the Java execution environment
- A manual check handled through the use of error codes
In computer languages that do not support exception handling, how are errors typically checked and handled?
In computer languages that do not support exception handling, how are errors typically checked and handled?
- By creating objects representing the errors
- No checking or handling is possible
- Through the use of error codes (correct)
- Automatically by the language interpreter
What happens when an exceptional condition arises in Java?
What happens when an exceptional condition arises in Java?
- An error code is generated
- The exception is ignored
- The program terminates immediately
- An object representing that exception is created and thrown in the method that caused the error (correct)
How are exceptions caught and processed in Java?
How are exceptions caught and processed in Java?
What kind of errors do exceptions thrown by Java relate to?
What kind of errors do exceptions thrown by Java relate to?
When are manually generated exceptions typically used in Java?
When are manually generated exceptions typically used in Java?
What keyword is used to manually throw an exception in Java?
What keyword is used to manually throw an exception in Java?
Which keyword is used to monitor program statements for exceptions in Java?
Which keyword is used to monitor program statements for exceptions in Java?
What type of exceptions are automatically thrown by the Java run-time system?
What type of exceptions are automatically thrown by the Java run-time system?
Which class is used for exceptional conditions that user programs should catch in Java?
Which class is used for exceptional conditions that user programs should catch in Java?
What is the keyword used to specify that an exception is thrown out of a method in Java?
What is the keyword used to specify that an exception is thrown out of a method in Java?
What subclass of Exception defines exceptions that are not expected to be caught under normal circumstances by a program in Java?
What subclass of Exception defines exceptions that are not expected to be caught under normal circumstances by a program in Java?
What is the top class in the exception class hierarchy in Java?
What is the top class in the exception class hierarchy in Java?
Which keyword is used to put code that must be executed after a try block completes in Java?
Which keyword is used to put code that must be executed after a try block completes in Java?
What is the subclass of Exception that includes things such as division by zero and invalid array indexing in Java?
What is the subclass of Exception that includes things such as division by zero and invalid array indexing in Java?
What is the class that should be subclassed to create custom exception types in Java?
What is the class that should be subclassed to create custom exception types in Java?
Flashcards are hidden until you start studying