
UNIT-4-EXCEPTION-HANDLING & I/O BASICS

Quiz
•
Information Technology (IT)
•
University
•
Medium
N.ILAYARAJA IT
Used 3+ times
FREE Resource
30 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What type of error is detected by the Java compiler?
Syntax Error
Run-time Error
Compile-time Error
Logical Error
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is a common compile-time error?
Dividing by zero
Missing semicolons
Null pointer exception
Array index out of bounds
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What happens when a run-time error occurs?
The program compiles successfully
The program produces incorrect output
The program runs indefinitely
The program crashes without any message
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which exception is thrown when an array index is out of bounds?
NullPointerException
IndexOutOfBoundsException
ArithmeticException
ArrayIndexOutOfBoundsException
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the purpose of the 'finally' block?
To catch exceptions
To define a method
To throw exceptions
To execute code regardless of an exception
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which keyword is used to manually throw an exception?
try
catch
throw
finally
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What type of exception is thrown for division by zero?
ArithmeticException
NullPointerException
IOException
FileNotFoundException
Create a free account and access millions of resources
Similar Resources on Wayground
25 questions
2nd Midterm Questions Level 3

Quiz
•
University
30 questions
Y9 Python Review

Quiz
•
9th Grade - University
27 questions
CNTT NÂNG CAO - P3 MÔ ĐUN 07 – XỬ LÝ VĂN BẢN NÂNG CAO

Quiz
•
University
25 questions
5. LINUX_3_polecenia systemowe

Quiz
•
11th Grade - University
25 questions
IT Concepts 2

Quiz
•
12th Grade - University
30 questions
C-Volution (Easy 1)

Quiz
•
University
25 questions
Quiz tentang Sharing Data dalam Jaringan

Quiz
•
11th Grade - University
28 questions
Review Python_G8

Quiz
•
8th Grade - University
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
Discover more resources for Information Technology (IT)
10 questions
Would you rather...

Quiz
•
KG - University
20 questions
Definite and Indefinite Articles in Spanish (Avancemos)

Quiz
•
8th Grade - University
7 questions
Force and Motion

Interactive video
•
4th Grade - University
10 questions
The Constitution, the Articles, and Federalism Crash Course US History

Interactive video
•
11th Grade - University
7 questions
Figurative Language: Idioms, Similes, and Metaphors

Interactive video
•
4th Grade - University
20 questions
Levels of Measurements

Quiz
•
11th Grade - University
16 questions
Water Modeling Activity

Lesson
•
11th Grade - University
10 questions
ACT English prep

Quiz
•
9th Grade - University