
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
Basic Python
Quiz
•
Professional Development
10 questions
Chapter 2 - FSW
Quiz
•
Professional Development
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
Popular Resources on Wayground
5 questions
This is not a...winter edition (Drawing game)
Quiz
•
1st - 5th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
10 questions
Identify Iconic Christmas Movie Scenes
Interactive video
•
6th - 10th Grade
20 questions
Christmas Trivia
Quiz
•
6th - 8th Grade
18 questions
Kids Christmas Trivia
Quiz
•
KG - 5th Grade
11 questions
How well do you know your Christmas Characters?
Lesson
•
3rd Grade
14 questions
Christmas Trivia
Quiz
•
5th Grade
20 questions
How the Grinch Stole Christmas
Quiz
•
5th Grade
Discover more resources for Computers
26 questions
Christmas Movie Trivia
Lesson
•
8th Grade - Professio...
25 questions
Christmas Movies
Quiz
•
Professional Development
20 questions
Christmas Trivia
Quiz
•
Professional Development
15 questions
Fun Holiday Trivia
Quiz
•
Professional Development
25 questions
Name That Tune - Christmas
Quiz
•
Professional Development
29 questions
Christmas Song Emoji Pictionary
Quiz
•
Professional Development
9 questions
Holiday Movie Trivia
Lesson
•
Professional Development
34 questions
Winter Trivia
Quiz
•
Professional Development
