
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
Seatwork #4

Quiz
•
12th Grade - University
26 questions
Desain Grafis X RPL

Quiz
•
10th Grade - University
28 questions
TN LTM code

Quiz
•
University
25 questions
G9-Introduction to Python Programming

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

Quiz
•
University
30 questions
QUIZ

Quiz
•
University
25 questions
Fundamentals of programming Quiz

Quiz
•
University
25 questions
Quiz tentang Sharing Data dalam Jaringan

Quiz
•
11th Grade - University
Popular Resources on Wayground
18 questions
Writing Launch Day 1

Lesson
•
3rd Grade
11 questions
Hallway & Bathroom Expectations

Quiz
•
6th - 8th Grade
11 questions
Standard Response Protocol

Quiz
•
6th - 8th Grade
40 questions
Algebra Review Topics

Quiz
•
9th - 12th Grade
4 questions
Exit Ticket 7/29

Quiz
•
8th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
19 questions
Handbook Overview

Lesson
•
9th - 12th Grade
20 questions
Subject-Verb Agreement

Quiz
•
9th Grade