Which of the following is NOT a loop in Java?

Java Loops Quiz

Quiz
•
Other
•
University
•
Hard
mukilan selvaraj
Used 1+ times
FREE Resource
53 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
for
while
loop
do-while
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the syntax of a for loop?
for(initialization; condition; increment) { }
for(condition; initialization; increment) { }
for(increment; condition; initialization) { }
for(initialization, increment, condition) { }
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following code? for(int i = 0; i 0) { i--; System.out.println(i); }
5 4 3 2 1 0
4 3 2 1 0
5 4 3 2 1
4 3 2 1
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
A while loop executes:
At least once
Zero or more times
Only once
Infinite times
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which statement is true about a do-while loop?
The loop executes only once
The condition is checked before execution
The loop executes at least once
It never executes
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output? int i = 1; do { System.out.print(i + " "); i++; } while (i < 4);
1 2 3
1 2 3 4
1 2
Infinite loop
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which loop is best when the number of iterations is unknown?
for
while
do-while
switch
Create a free account and access millions of resources
Similar Resources on Quizizz
50 questions
untitled

Quiz
•
11th Grade - University
50 questions
RVTI Level 1 Electrical Systems

Quiz
•
University
58 questions
AP Macro Review

Quiz
•
12th Grade - University
50 questions
TRY OUT KE -3 TEORI KEJURUAN TKRO

Quiz
•
12th Grade - University
50 questions
MIDTERM EXAMINATION IN LIVING IN THE IT ERA

Quiz
•
University
50 questions
Đề thi cuối kỳ: Lập trình giao diện (2019-2020) - ĐH Mở TP.HCM

Quiz
•
University
48 questions
ECG/EKG

Quiz
•
12th Grade - University
54 questions
прога 1

Quiz
•
University
Popular Resources on Quizizz
15 questions
Character Analysis

Quiz
•
4th Grade
17 questions
Chapter 12 - Doing the Right Thing

Quiz
•
9th - 12th Grade
10 questions
American Flag

Quiz
•
1st - 2nd Grade
20 questions
Reading Comprehension

Quiz
•
5th Grade
30 questions
Linear Inequalities

Quiz
•
9th - 12th Grade
20 questions
Types of Credit

Quiz
•
9th - 12th Grade
18 questions
Full S.T.E.A.M. Ahead Summer Academy Pre-Test 24-25

Quiz
•
5th Grade
14 questions
Misplaced and Dangling Modifiers

Quiz
•
6th - 8th Grade