
Java Exam

Quiz
•
11th Grade
•
Medium
Used 4+ times
FREE Resource
Student preview

10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the correct for loop?
for(int i = 0; i < 3; i++);
for(i = 0 < 3; i++);
for int i = 0; i < 3; i++
for(int i = 0; i < 3; i++)
2.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What does this code print
for (int i = 3; i < 8; i++)
{
System.out.print(i + " ");
}
4 5 6 7 8
3 4 5 6 7
2 3 4 5 6
3 4 6 7 5
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does this code print?
for (int i = 3; i <= 9; i++)
{
System.out.print("*");
}
8
11
3
7
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
for (int i=1; i<30; i = i + 3)
{
if (i%2 == 0) System.out.print((i/2)+" ");
}
System.out.println();
6 3 4 7 11
5 6 9 1 5
2 5 8 11 14
8 9 16 0 9
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
for (int i=5; i>0; i--)
{
for (int j=0; j<i; j++)
System.out.print((2*i-j)+" ");
System.out.println();
}
9 3 4 5 6
2 3 4 5
2 3 4
2 3
2
6 7 8 9 10
6 7 8 9
7 8 9
8 9
10 9 8 7 6
8 7 6 5
6 5 4
4 3
2
9 8 7 6 6
9 8 7 6
9 8 6
9 8
9
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
var i = 0;
while (i < 3) {
println("hi");
i++;
}
hi hi hi
hi
hi
hi
hi
hihihi
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
var i = 0;
while (i < 3) {
println("hi");
i++;
}
println("ant");
hi
ant
hihihi
hi hi hi ant
hi
hi
hi
ant
Create a free account and access millions of resources
Popular Resources on Wayground
11 questions
Hallway & Bathroom Expectations

Quiz
•
6th - 8th Grade
20 questions
PBIS-HGMS

Quiz
•
6th - 8th Grade
10 questions
"LAST STOP ON MARKET STREET" Vocabulary Quiz

Quiz
•
3rd Grade
19 questions
Fractions to Decimals and Decimals to Fractions

Quiz
•
6th Grade
16 questions
Logic and Venn Diagrams

Quiz
•
12th Grade
15 questions
Compare and Order Decimals

Quiz
•
4th - 5th Grade
20 questions
Simplifying Fractions

Quiz
•
6th Grade
20 questions
Multiplication facts 1-12

Quiz
•
2nd - 3rd Grade