Question
11- This expression is executed by the for loop only once, regardless of the number of iterations. a. initialization expression b. test expression c. update
11- This expression is executed by the for loop only once, regardless of the number of iterations.
a. initialization expression b. test expression c. update expression d. pre-increment expression
12- This is a variable that keeps a running total. a. sentinel
b. sum c. total d. accumulator
13- This is a special value that signals when there are no more items from a list of items to be processed. This value cannot be mistaken as an item from the list. a. sentinel b. flag
c. signal d. accumulator
14-To open a file for writing, you use the following class.
a. PrintWriter
b. FileOpen c. OutputFile
d. FileReader
15- To open a file for reading, you use the following classes.
a. File and Writer
b. File and Output
c. File and Input
d. File and Scanner
16-When a program is finished using a file, it should do this. a. erase the file
b. close the file c. throw an exception d. reset the read position
17- This class allows you to use the print and println methods to write data to a file.
a. File
b. FileReader
c. OutputFile
d. PrintWriter
18- This class allows you to read a line from a file.
a. FileWriter
b. Scanner c. InputFile
d. FileReader
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started