CSC110 Test 2 Topic Review

Réussis tes devoirs et examens dès maintenant avec Quizwiz!

Initialization list

In Java, you do not use the new operator when you use a(n) ________.

A way to terminate

In all but very rare cases, loops must contain, within themselves ________.

Array's size declarator

The ________ indicates the number of elements the array can hold.

User controlled loop

The ________ loop allows the user to decide on the number of iterations.

28

What will be the value of x after the following code is executed? int x, y = 4, z = 6; x = (y++) * (++z);

x = 33, y = 9

What will be the values of x and y as a result of the following code? int x = 25, y = 8; x += y++;

While, for

Which of the following are pre-test loops?

Do-While

The ________ loop is ideal in situations where you always want the loop to iterate at least once.

Conditional

A loop that executes as long as a particular condition exists is called a(n) ________ loop.

Sentinel

A(n) ________ is a special value that cannot be mistaken as a member of a list of data items and signals that there are no more data items to be processed.

Subscript

A(n) ________ is used as an index to pinpoint a specific element within an array.

Delimiter

An item that separates other items is known as a ________.

Length

Each array in Java has a public field named ________ that contains the number of elements in the array.

Iteration

Each repetition of a loop is known as a(n) ________.

Infinite

If a loop does not contain, within itself, a valid way to terminate, it is called a(n) ________ loop.

Final

It is common practice to use a ________ variable as a size declarator.

Array bounds checking

Java performs ________, which means that it does not allow a statement to use a subscript that is outside the range of valid subscripts for the array.

Loop control Variable

The variable that controls the number of times a loop iterates is known as a ________.

Accumulator

The variable used to keep a running total in a loop is called a(n) ________.

For

The ________ loop is ideal in situations where the exact number of iterations is known.

The method has direct access to the original array

When an array is passed to a method ________.


Ensembles d'études connexes

Chapter 15 Loss Reserving Methods

View Set

ECON 201 Practice Midterm 2 (Chapters 13-18)

View Set

The Cell-an Introduction: Biology

View Set

Intro to Data Science and AI Maastricht Lectures 1-6b

View Set