Java Summative Assessment 2
Quiz
•
Computers
•
12th Grade
•
Practice Problem
•
Easy
chrisbenedict sevilleno
Used 1+ times
FREE Resource
Enhance your content in a minute
20 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of this code?
```java
int x = 5;
if (x > 0) {
System.out.println("Positive");
} else {
System.out.println("Negative");
}
Positive
Negative
Nothing
Error
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which symbol is used for the "not equal to" comparison in an if statement?
`!=`
`==`
`>`
`<>`
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will this code print?
```java
int age = 16;
if (age >= 18) {
System.out.println("Adult");
} else {
System.out.println("Minor");
}
```
Adult
Minor
Nothing
Error
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the correct syntax for an if-else statement?
`if condition { } else { }`
`if (condition) { } else { }`
`if [condition] { } else { }`
`if condition then { } else { }`
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will this code output?
```java
int num = 10;
if (num % 2 == 0) {
System.out.println("Even");
} else {
System.out.println("Odd");
}
Even
Odd
Nothing
Error
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does this code print?
```java
boolean isSunny = false;
if (isSunny) {
System.out.println("Go outside");
} else {
System.out.println("Stay inside");
}
Go outside
Stay inside
Nothing
Error
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is missing in this code to make it compile?
```java int x = 7;
if x > 5 {
System.out.println("Big");
}
```
Parentheses around the condition
Curly braces
Semicolon after the condition
A variable declaration
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
20 questions
Processing- The CPU Quiz
Quiz
•
10th Grade - University
18 questions
The Rise of Intelligent Machines
Quiz
•
8th Grade - University
15 questions
quiz Pertama XII
Quiz
•
9th - 12th Grade
15 questions
Sejarah Komputer 2
Quiz
•
1st - 12th Grade
16 questions
Hour_of_Code
Quiz
•
5th - 12th Grade
15 questions
EmTech Module 1.1 Pretest
Quiz
•
12th Grade
20 questions
Skill Competition Quiz 2024
Quiz
•
10th Grade - University
20 questions
SOFTWARE 7I
Quiz
•
7th Grade - University
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...
15 questions
Christmas Song Emoji Pictionary
Quiz
•
7th - 12th Grade
20 questions
Christmas Movies
Quiz
•
1st - 12th Grade
55 questions
CHS Holiday Trivia
Quiz
•
12th Grade
20 questions
Christmas Movie Trivia
Quiz
•
9th - 12th Grade
29 questions
christmas facts
Lesson
•
5th - 12th Grade
20 questions
Christmas Trivia
Quiz
•
5th - 12th Grade
20 questions
Stages of Meiosis
Quiz
•
9th - 12th Grade
