
After Group Activity
Quiz
•
Computers
•
Professional Development
•
Practice Problem
•
Medium
Ms STAFF
Used 1+ times
FREE Resource
Enhance your content in a minute
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)
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
PW CT Quiz
Quiz
•
Professional Development
10 questions
Lesson 1: The Basics
Quiz
•
Professional Development
10 questions
Java main() and Scanner
Quiz
•
Professional Development
10 questions
Digital Skills
Quiz
•
Professional Development
10 questions
Computer Science Vocabulary
Quiz
•
Professional Development
10 questions
Data Governance - 2
Quiz
•
Professional Development
10 questions
Basic Python
Quiz
•
Professional Development
10 questions
Chapter 2 - FSW
Quiz
•
Professional Development
Popular Resources on Wayground
7 questions
History of Valentine's Day
Interactive video
•
4th Grade
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
15 questions
Valentine's Day Trivia
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
Discover more resources for Computers
44 questions
Would you rather...
Quiz
•
Professional Development
20 questions
Black History Month Trivia Game #1
Quiz
•
Professional Development
12 questions
Mardi Gras Trivia
Quiz
•
Professional Development
14 questions
Valentine's Day Trivia!
Quiz
•
Professional Development
7 questions
Copy of G5_U5_L14_22-23
Lesson
•
KG - Professional Dev...
16 questions
Parallel, Perpendicular, and Intersecting Lines
Quiz
•
KG - Professional Dev...
11 questions
NFL Football logos
Quiz
•
KG - Professional Dev...
12 questions
Valentines Day Trivia
Quiz
•
Professional Development
