
Java Exception Handling Basics
Authored by DR MURTHY
Computers
12th Grade
Used 1+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the base class for all exceptions in Java? A) Object B) Throwable C) Exception D) RuntimeException
B) Throwable
D) ExceptionHandler
A) String
C) Error
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which keyword is used to manually throw an exception in Java? A) throw B) throws C) try D) catch
throwsException
throwing
A) throw
exception
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is a checked exception? A) ArrayIndexOutOfBoundsException B) IOException C) NullPointerException D) ArithmeticException
ClassCastException
IOException
IndexOutOfBoundsException
FileNotFoundException
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which block is used to handle exceptions in Java? A) finally B) try C) catch D) throw
B) try
C) catch
A) finally
D) throw
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will happen if an exception is not handled in a Java program? A) The program will terminate abnormally B) The program will continue execution C) The exception will be ignored D) The program will enter an infinite loop
The program will display a warning message
A) The program will terminate abnormally
The program will restart from the beginning
The program will automatically fix the error
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is an unchecked exception? A) FileNotFoundException B) IOException C) NullPointerException D) ClassNotFoundException
NullPointerException
NumberFormatException
SQLException
ArrayIndexOutOfBoundsException
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the purpose of the finally block in exception handling? A) To catch exceptions B) To execute code regardless of an exception C) To throw exceptions D) To define checked exceptions
B) To execute code regardless of an exception
F) To ignore exceptions
E) To log exceptions
G) To define runtime exceptions
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
10 questions
Bilgisayarın Temel Birimleri
Quiz
•
9th Grade - University
12 questions
ASK Tingkatan 1: 2.2.2 Format Imej pada Fail yang Sama
Quiz
•
12th Grade - University
10 questions
Interfejsy USB i bezprzewodowe oraz urządzenia wskazujące i
Quiz
•
9th - 12th Grade
15 questions
ASAS SAINS KOMPUTER - Pemikiran Komputasional
Quiz
•
12th Grade
14 questions
LA7.C7: Turtle Graphics
Quiz
•
9th Grade - University
12 questions
AP CSP BI 4
Quiz
•
9th - 12th Grade
15 questions
M2S5P1
Quiz
•
12th Grade
10 questions
1.1 - System Architecture - CPU [OCR] [GCSE]
Quiz
•
9th - 12th Grade
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade
20 questions
Figurative Language Review
Quiz
•
6th Grade