
MCQs on Iterative Statements in Java

Quiz
•
Information Technology (IT)
•
University
•
Hard
Geshani ITUM
Used 19+ times
FREE Resource
17 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 5 pts
Which statement is used for looping in Java?
if-else
while
switch
try-catch
2.
MULTIPLE CHOICE QUESTION
30 sec • 5 pts
What is another term for iterative statements in Java?
Decision-making statements
Looping statements
Jump statements
None of the above
3.
MULTIPLE CHOICE QUESTION
30 sec • 5 pts
What will the following while loop print? int i = 1; while (i <= 3) { System.out.println(i); i++; }
123
1 2 3
3 2 1
Infinite loop
4.
MULTIPLE CHOICE QUESTION
30 sec • 5 pts
How does a do-while loop differ from a while loop?
A do-while loop does not use conditions
A do-while loop executes at least once
A do-while loop is faster
None of the above
5.
MULTIPLE CHOICE QUESTION
30 sec • 5 pts
Which keyword is used to exit a loop prematurely?
exit
stop
break
return
6.
MULTIPLE CHOICE QUESTION
30 sec • 5 pts
What is the output of the following code? for (int i = 0; i < 3; i++) { System.out.print(i + " "); }
0 1 2
0 1 2 3
1 2 3
Compilation error
7.
MULTIPLE CHOICE QUESTION
30 sec • 5 pts
A nested for loop is used when:
We want to iterate only once
Multiple iterations depend on each other
We have conditional statements
None of the above
Create a free account and access millions of resources
Similar Resources on Wayground
20 questions
Introduction to C# Programming

Quiz
•
10th Grade - University
20 questions
Python Quiz Girls in ICT Day

Quiz
•
University
20 questions
Google Sheets Quiz 30/09/2024

Quiz
•
University
15 questions
JavaScript-Day2

Quiz
•
University
14 questions
Data Structures and Algorithms Quiz

Quiz
•
University
15 questions
Python Loop

Quiz
•
University
13 questions
Introduction To Programming - Lesson Exception Handling

Quiz
•
11th Grade - University
15 questions
แข่งขันcodingม.ปลาย

Quiz
•
12th Grade - University
Popular Resources on Wayground
50 questions
Trivia 7/25

Quiz
•
12th Grade
11 questions
Standard Response Protocol

Quiz
•
6th - 8th Grade
11 questions
Negative Exponents

Quiz
•
7th - 8th Grade
12 questions
Exponent Expressions

Quiz
•
6th Grade
4 questions
Exit Ticket 7/29

Quiz
•
8th Grade
20 questions
Subject-Verb Agreement

Quiz
•
9th Grade
20 questions
One Step Equations All Operations

Quiz
•
6th - 7th Grade
18 questions
"A Quilt of a Country"

Quiz
•
9th Grade