
DADT03 Exception Handling

Quiz
•
Information Technology (IT)
•
Professional Development
•
Medium
Izzati Safwanah
Used 1+ times
FREE Resource
Student preview

11 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the main purpose of exception handling in Java?
To ignore runtime errors
To terminate the program immediately
To handle runtime errors gracefully
To increase program performance
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is a checked exception?
NullPointerException
IOException
ArithmeticException
ArrayIndexOutOfBoundsException
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the top-most class in the exception hierarchy in Java?
RuntimeException
Error
Exception
Throwable
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which keyword is used to handle exceptions in Java?
throw
catch
try
finally
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which keyword is used to explicitly raise an exception?
raise
throws
throw
error
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which method must be overridden when creating a custom exception class?
getCause()
toString()
getMessage()
None (optional override)
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
In a try-with-resources statement, which interface must the resource implement?
AutoCloseable
Serializable
Runnable
CloseableOnly
Create a free account and access millions of resources
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
10 questions
UPDATED FOREST Kindness 9-22

Lesson
•
9th - 12th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
20 questions
US Constitution Quiz

Quiz
•
11th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade