6. 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 19. true or false: the while loop is a pretest loop. 20. true or false: the do-while loop is a pretest loop. 21. true or false: the for loop is a posttest loop. 22. true or false: it is not necessary to initialize accumulator variables. 23. true or false: one limitation of the for loop is that only one variable may be initialized in the initialization expression. 24. true or false: a variable may be defined in the initialization expression of the for loop. 25. true or false: in a nested loop, the inner loop goes through all of its iterations for every iteration of the outer loop. 26. true or false: to calculate the total number of iterations of a nested loop, add the number of iterations of all the loops.