
Unit 3 Review
Quiz
•
Computers
•
9th - 12th Grade
•
Medium
Karen Russo
Used 1+ times
FREE Resource
Enhance your content in a minute
18 questions
Show all answers
1.
FILL IN THE BLANK QUESTION
1 min • 1 pt
If a = 15 and b = 12, what is the result of the following:
if (a ==10)
{ b = b + a;
a = 5; }
else if (a > 10)
{ a = a - b;
b = a * b; }
a = _______________ b = ____________
2.
FILL IN THE BLANK QUESTION
1 min • 1 pt
What will be the output for the following program segment?
int junk = 12;
if (junk > 5)
if (junk % 5 == 0)
System.out.println ("The value of junk is: " + junk);
else
System.out.println(("Junk is negative");
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Find the errors in the following if statement.
if x > 0 then System.out.println(x);
needs an == sign
No parentheses around x > 0
"then" is not used in java
No parentheses around x > 0 and "then" is not used in java
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Find the error in the following if statement.
if ( x = 1) { y ++;}
y ++ is not a valid statement
the curly brackets will cause a compile error
the condition should be (x == 1)
there is no else statement
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Find the error in the following if statement.
String word = new String("Hello");
String word2 = new String("Hello");
if (word == word2)
System.out.println("The words are the same");
else
System.out.println("The words are not the same");
it is missing curly brackets
you need to use .equals() instead of ==
you need to use = instead of ==
There is no error
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Find the error in the following if statements.
String word = new String ("Hello");
String word2 = new String("Hello");
if (word.equals(word2));
System.out.println("The words are the same");
else
System.out.println("The words are not the same");
use == instead of .equals()
there are no curly brackets
remove the ; at the end of the if condition
use = instead of .equals()
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the value of s if x = 5 and y = 2 after executing the following cod:
s = 0;
if (x > 0) { s++;}
if (y > 0) {s ++;}
s = 0
s = 1
s = 2
s = -2
Create a free account and access millions of resources
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
15 questions
SOAL AIJ
Quiz
•
11th Grade
15 questions
MIT APP - QUIZ
Quiz
•
10th Grade
15 questions
Security
Quiz
•
9th Grade
13 questions
Pengenalan Aplikasi Blender
Quiz
•
11th Grade
20 questions
Skill Competition Quiz 2024
Quiz
•
10th Grade - University
15 questions
Dasar Kompetensi Keahlian IPv6
Quiz
•
10th Grade
13 questions
LENGUAJE C
Quiz
•
11th Grade
20 questions
CSS - Operating System
Quiz
•
11th Grade
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
