Java Unit 2 Flashcards
Semantic errors that show up as incorrect behavior rather than as compilation errors is called?
A bug
A program that can help you find bugs.
Debugger
What is a Counting Loop?
Incrementing a variable each time the loop is processed.
A block statement consisting of several statements grouped together between a pair of braces is called?
The body of the loop
Define continuation condition.
Where the body of a loop is repeated as long as the boolean-expression is true.
A data value created to initiate a while loop is sometimes called a “ “ value.
sentinel
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.
flag or flag variable
What does “!boolean” do?
Gives you the opposite value of the boolean.
Regarding for loops, the continuation-condition must be a “ “ expression.
boolean-valued
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?
loop control variable
for ( years = 0; years < 5; years++ )
What kind of loop is the following for loop?
for ( variable = min; variable <= max; variable++ )
counting loop