The mode which the operator is placed after the variable is called:
postfix mode.
The mode which the operator is placed before the variable is called:
prefix mode.
A control structure that causes a statement or group of statements to repeat is called:
a loop.
The while loop has 2 important parts:
1 - a boolean expression that is tested for a true or false value.
2 - a statement or block of statements that is repeated as long as the expression is true.
The loop header consists of of the key word while followed by:
a boolean expression enclosed in parentheses.
A repetition of a loop is known as:
an iteration.
The loop that continues to repeat until the program is interrupted is called:
an infinite loop.
The process of inspecting data given to a program by the user and determining if it is valid is called:
input validation.
The read operation that takes place just before the loop is called:
a priming read.
The do-while loop uses a posttest loop which means:
its boolean expression is tested after each iteration.
The loop that is ideal for performing a known number of iterations is:
a for loop.
The loop that executes as long as a particular condition exists is
a conditional loop.
A loop that repeats a specific number of times is known as:
a count-controlled loop.
In Java, the loop that is ideal for writing count-controlled loops is:
a for loop.
The first line of the for loop is known as:
the loop header.
The running total is a sum of numbers that accumulates with each iteration of a loop.
The variable used to keep the running total is called:
an accumulator.
The name of the value that signals when the end of a list of a values has been reached is called:
a sentinal.
A variable intialized with a starting string then accumulates a sum of numbers by having the numbers added to it is called:
an accumulator.
A special value that cannot be mistaken as a member of the list and signals that there are no more values to be entered is:
the sentinal value.
A loop that is inside another loop is called:
a nested loop.
The statement that causes a loop to terminate early is:
the break statement.
The statement that causes a loop to stop its current iteration and begin the next one is:
the continue statement.
What will the println statement in the following program segment display?
int x = 5;
System.out.println(x++);
5
In the expression number x++, the ++ operator is in what mode?
postfix mode
This is the variable that controls the number of iterations performed by a loop.
loop control variable
The do-while loop is this type of loop.
posttest loop
This type of loop has no way of ending and repeats until the program is interrupted.
infinite loop
This expression is executed by the for loop only once, regardless of the number of iterations.
intialization expression
This is a special value that signals when there are no more items from a list of items to be processsed. This value cannot be mistaken as an item from the list.
sentinal value
To open a file for reading, you use the following classes.
File and Scanner
This class allows you to use the print and println methods to write data to a file.
PrintWriter class
The while loop is a pretest loop (true or false).
True
The for loop is a posttest loop (true or false).
False
One limitation of the for loop is that only one variable may be initialized in the initialization expression (true or false).