Java Loops

Java Loops

Assessment

Flashcard

Computers

KG

Practice Problem

Hard

Created by

Wayground Content

FREE Resource

Student preview

quiz-placeholder

21 questions

Show all answers

1.

FLASHCARD QUESTION

Front

A while loop carries on as long as...

Back

The condition in the brackets is true

2.

FLASHCARD QUESTION

Front

A while loop has the following format: while (condition) { ... }

Back

while (condition) { ... }

3.

FLASHCARD QUESTION

Front

What is the output of the following code?
int i = 1;
while (i < 5) {
System.out.println("Hello");
i++;
}

Back

Hello
Hello
Hello
Hello

4.

FLASHCARD QUESTION

Front

While loops are not really important or necessary in Java

Back

False

5.

FLASHCARD QUESTION

Front

How many stars are printed? Options: 7, 3, 4, 5, Infinite Loop

Back

4

6.

FLASHCARD QUESTION

Front

In total, how many times is the inner loop executed? Options: 5, 10, 15, 50, Infinite Loop

Back

50

7.

FLASHCARD QUESTION

Front

How many times does the loop print a *?

Back

20

Create a free account and access millions of resources

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

By signing up, you agree to our Terms of Service & Privacy Policy

Already have an account?