Java while loops

Java while loops

10th - 12th Grade

6 Qs

quiz-placeholder

Similar activities

Mixed Review Python

Mixed Review Python

9th - 12th Grade

10 Qs

Loops 101 DW Quiz

Loops 101 DW Quiz

9th - 12th Grade

10 Qs

Struktur Kontrol Perulangan

Struktur Kontrol Perulangan

10th - 11th Grade

10 Qs

Basic Programming Constructs

Basic Programming Constructs

11th Grade

11 Qs

Gmetrix JavaScript Session 3 Test

Gmetrix JavaScript Session 3 Test

9th - 12th Grade

10 Qs

Project Stem Python Fundamentals

Project Stem Python Fundamentals

10th - 11th Grade

10 Qs

Basics of python

Basics of python

10th Grade - Professional Development

11 Qs

Programming Basics

Programming Basics

9th - 10th Grade

10 Qs

Java while loops

Java while loops

Assessment

Quiz

Computers

10th - 12th Grade

Medium

Created by

Claire Firman

Used 17+ times

FREE Resource

6 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 5 pts

A while loop carries on as long as...

The condition in the brackets is true

The condition in the brackets is false

i < 10

the for loop has not ended

2.

MULTIPLE CHOICE QUESTION

30 sec • 5 pts

A while loop has the following format:

while (condition)

{

...

}

while

{

...

}

continue while (condition)

{

...

}

while [condition]

[

...;

]

3.

MULTIPLE SELECT QUESTION

45 sec • 5 pts

A condition in Javacould be any of the following:

a >, <, ==, >=, <= relation

str1.equals(str2)

str1.equalsIgnoreCase(str2)

str.length()

4.

MULTIPLE SELECT QUESTION

45 sec • 5 pts

While loops are used when ...

You are not sure how many times exactly a loop should iterate

You want a loop to repeat while the condition is true

You don't like for loops

You don't like to wait for things

5.

MULTIPLE CHOICE QUESTION

30 sec • 5 pts

OUTPUT?

int i = 1;

while (i < 5) {

System.out.println("Hello");

i++;

}

Hello

Hello

Hello

Hello

Hello

Hello

Hello

Hello

Hello

Hello

Hello

Hello

Hello

6.

MULTIPLE CHOICE QUESTION

30 sec • 5 pts

While loops are not really important or necessary in Java

True

False