
After Group Activity

Quiz
•
Computers
•
Professional Development
•
Medium
Ms STAFF
Used 1+ times
FREE Resource
5 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following Java code?
class Output {
public static void main(String args[]) {
try {
int a = 0;
int b = 5;
int c = a / b;
System.out.print("Hello");
} finally {
System.out.print("World");
}
}
}
Hello
World
HelloWorld
Compilation Error
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following exceptions is not a subclass of the RuntimeException class?
NullPointerException
ArrayIndexOutOfBoundsException
IOException
ArithmeticException
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the following program?
public class Question {
public static void main(String[] args) {
try {
int a = 5 / 0;
}
catch (Exception e) {
catch (ArithmeticException a) {
System.out.println("Cannot divide by 0");
}
}
System.out.println("Hello World");
}
}
“Hello World”
“Cannot divide by 0”
Compilation Error
Runtime Error (the code compiles successfully)
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which exception is thrown when an array element is accessed beyond the array size?
ArrayElementOutOfBounds
ArrayIndexOutOfBoundsException
ArrayIndexOutOfBounds
None of these
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the following program?
public class Question {
public static void main(String[] args) {
try {
int a = 5 / 0;
}
catch (Exception e) {
System.out.println("unknown exception");
}
catch (ArithmeticException a) {
System.out.println("Cannot divide by 0");
}
System.out.println("Hello World");
}
}
“Hello World”
“Cannot divide by 0”
Compilation Error
RuntimeError (the code compiles successfully)
Similar Resources on Wayground
10 questions
JS Linked in Exam (Easy)

Quiz
•
Professional Development
10 questions
Java Strings

Quiz
•
1st Grade - Professio...
10 questions
Java Increment & Decrement Operators

Quiz
•
Professional Development
10 questions
PBO

Quiz
•
Professional Development
10 questions
Introducción al lenguaje Python

Quiz
•
Professional Development
6 questions
ExceptionQuiz

Quiz
•
Professional Development
10 questions
React and Hooks

Quiz
•
Professional Development
10 questions
CS402 T05

Quiz
•
Professional Development
Popular Resources on Wayground
55 questions
CHS Student Handbook 25-26

Quiz
•
9th Grade
18 questions
Writing Launch Day 1

Lesson
•
3rd Grade
10 questions
Chaffey

Quiz
•
9th - 12th Grade
15 questions
PRIDE

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

Quiz
•
9th - 12th Grade
22 questions
6-8 Digital Citizenship Review

Quiz
•
6th - 8th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade