Java Unit 2 Flashcards

1
Q

Semantic errors that show up as incorrect behavior rather than as compilation errors is called?

A

A bug

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

A program that can help you find bugs.

A

Debugger

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is a Counting Loop?

A

Incrementing a variable each time the loop is processed.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

A block statement consisting of several statements grouped together between a pair of braces is called?

A

The body of the loop

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Define continuation condition.

A

Where the body of a loop is repeated as long as the boolean-expression is true.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

A data value created to initiate a while loop is sometimes called a “ “ value.

A

sentinel

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is it called when a boolean variable is used as a signal that is set in one part of the program and tested in another part.

A

flag or flag variable

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What does “!boolean” do?

A

Gives you the opposite value of the boolean.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Regarding for loops, the continuation-condition must be a “ “ expression.

A

boolean-valued

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

The value of the variable is tested in the continuation condition, and the loop ends when this condition evaluates to false. A variable used in this way is called a?

A

loop control variable
for ( years = 0; years < 5; years++ )

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What kind of loop is the following for loop?
for ( variable = min; variable <= max; variable++ )

A

counting loop

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly