
Exception Handling and CollectionQuiz

Quiz
•
Computers
•
University
•
Hard
Ms. Asst.Prof
Used 3+ times
FREE Resource
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which class acts as a root for all java classes?
String
Object
Throwable
None of the above
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is not a kind of exception that is thrown by the JDBC method?
DataRounding
SQL Exception
DataTruncation
SQL Warning
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Predict the output of following Java program
class Main {
public static void main(String args[]) {
try {
throw 10;
}
catch(int e) {
System.out.println("Got the Exception " + e);
}
}
}
Got the Exception 10
Got the Exception 0
Compiler Error
None
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Output of following Java program?
class Main {
public static void main(String args[]) {
int x = 0;
int y = 10;
int z = y/x;
}
}
Compiler Error
Compiles fine but throws ArrayIndexOutOfBoundsException
Compiles and runs fine
Compiles fine but throws ArithmeticException exception
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
The closest common ancestor of RuntimeException, Error, IOException and ClassNotFoundException is:
Object
Exception
Throwable
Catchable
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following statements is true about Java's finally block?
The finally block is only executed if an exception is thrown in the try block
The finally block is only executed if an exception is thrown in the catch block
The finally block is only executed if an exception is not thrown in the try or catch block
The finally block is executed regardless of whether an exception is thrown in the try or catch block
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which interface provides key-value pair?
List
Set
Map
Collection
Create a free account and access millions of resources
Similar Resources on Wayground
10 questions
exhandl

Quiz
•
University
10 questions
Basics Of C Programming

Quiz
•
University
10 questions
G12_Week7

Quiz
•
12th Grade - University
7 questions
exceptions in python

Quiz
•
University
15 questions
Coding club Summit Online Quiz

Quiz
•
University
15 questions
Exception handling

Quiz
•
University
15 questions
java básico y pilas

Quiz
•
University
10 questions
C - Pointers

Quiz
•
University
Popular Resources on Wayground
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
10 questions
9/11 Experience and Reflections

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

Quiz
•
5th Grade
11 questions
All about me

Quiz
•
Professional Development
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
9 questions
Tips & Tricks

Lesson
•
6th - 8th Grade
Discover more resources for Computers
21 questions
Spanish-Speaking Countries

Quiz
•
6th Grade - University
20 questions
Levels of Measurements

Quiz
•
11th Grade - University
7 questions
Common and Proper Nouns

Interactive video
•
4th Grade - University
12 questions
Los numeros en español.

Lesson
•
6th Grade - University
7 questions
PC: Unit 1 Quiz Review

Quiz
•
11th Grade - University
7 questions
Supporting the Main Idea –Informational

Interactive video
•
4th Grade - University
12 questions
Hurricane or Tornado

Quiz
•
3rd Grade - University
7 questions
Enzymes (Updated)

Interactive video
•
11th Grade - University