
JAVA LOOPS
Quiz
•
Computers
•
2nd Grade
•
Practice Problem
•
Hard
RAVINDER B
Used 6+ times
FREE Resource
Enhance your content in a minute
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
for (int i = 0; i < 3; System.out.print(i + " "))
{
i++;
}
0 1 2
1 2 3
0 2
Infinite loop
2.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
int i = 0;
while (i < 5)
if (i++ % 2 == 0)
System.out.print(i + " ");
}
1 3 5
0 2 4
2 4
1 2 3 4 5
3.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
for (int i = 0; i < 10; i++) {
if (i * i > 30)
break;
System.out.print(i + " ");
}
0 1 2 3 4
0 1 2 3 4 5
0 1 2 3 4 5 6
None
4.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
int i = 0, j = 5;
for (; i < j; j--) {
if (i++ % 2 == 0)
continue;
System.out.print(i + j + " ");
}
5 6 7
7 8
7 8 9
ERROR
5.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
outer:
for (int i = 1; i <= 3; i++) {
inner:
for (int j = 1; j <= 3; j++) {
if (i * j == 4)
break outer;
System.out.print(i + "" + j + " ");
}
}
11 12 13 21 22
11 12 13 21 22 23
11 12 13 21 22 23 31 32 33
11 12 13 21 22
6.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
int x = 0;
for (int y = 0; y < 3; y++) {
x++;
}
System.out.println(x + " " + y);
3 3
3 2
3 1
ERROR
7.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
int sum = 0;
for (int i = 0; i < 3; i++)
for (int j = 0; j < 3; j++)
if ((i + j) % 2 == 0)
sum += i + j;
System.out.println(sum);
9
8
10
12
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
14 questions
Computer
Quiz
•
2nd Grade
10 questions
ASAS SAINS KOMPUTER TING 1-( HTML 2)
Quiz
•
1st - 3rd Grade
10 questions
Teknik Pemikiran Komputasional
Quiz
•
2nd - 3rd Grade
10 questions
Arquitetura IPv6
Quiz
•
1st Grade - University
15 questions
S2 Databases
Quiz
•
2nd Grade
10 questions
C# lesson10
Quiz
•
1st - 10th Grade
10 questions
Konsep Routing
Quiz
•
1st - 10th Grade
9 questions
KS3 - Selection, Iteration or Sequence
Quiz
•
KG - 12th Grade
Popular Resources on Wayground
5 questions
This is not a...winter edition (Drawing game)
Quiz
•
1st - 5th Grade
15 questions
4:3 Model Multiplication of Decimals by Whole Numbers
Quiz
•
5th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
10 questions
The Best Christmas Pageant Ever Chapters 1 & 2
Quiz
•
4th Grade
12 questions
Unit 4 Review Day
Quiz
•
3rd 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
