Java while loops

Java while loops

10th - 12th Grade

6 Qs

quiz-placeholder

Similar activities

Roblox Lua Scripting Quiz

Roblox Lua Scripting Quiz

1st - 12th Grade

8 Qs

CS 50 Terminology

CS 50 Terminology

6th - 10th Grade

10 Qs

CodeHS While Loops

CodeHS While Loops

9th - 12th Grade

11 Qs

L.7.LOOPING STRUCTURE

L.7.LOOPING STRUCTURE

12th Grade

10 Qs

Programming Basics

Programming Basics

10th Grade

9 Qs

Quiz 4 Edhesive Review

Quiz 4 Edhesive Review

9th - 12th Grade

10 Qs

Python Loops

Python Loops

9th - 12th Grade

10 Qs

LOOPS IN C++

LOOPS IN C++

10th Grade - University

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