Chapter 4 Flashcards
Loop control variable
A variable that controls the number of iterations preformed by a loop
While loop type
Pretest
Do while loop type
Post test
For loop type
Pretest loop
This type of loop always executes at least once
Do-while
This expression is executed by the for loop only once, regardless of iterations
Initializing expression
This variable keeps a running total
Accumulator
To open a file for writing you use
PrintWriter
To open a file for reading
File and scanner
This class allows you to use the print and println methods to write data into a file
PrintWriter
This class allows you to read a line from a file
Scanner
(True or false) the while loop is a pretest loop
True
(True or false) the do-while loop is a pre-test loop
False
(True or false) The for loop is a post test loop
False
(True or false) it is not necessary to initialize the accumulator variables
False