Records in a sequential file are not usually updated in plac
Records in a sequential file are not usually updated in place. Instead ________.
a.
The above statement is false—records in sequential files are usually updated in place.
b.
the entire file is usually rewritten
c.
the file is truncated
d.
the updated data is placed in a “surrogate” fil
Which of the following statements is true?
a.
Class Scanner provides the ability to reposition to the beginning of a file with method seek.
b.
Class Scanner does not provide the ability to reposition to the beginning of the file.
c.
Class Scanner provides the ability to reposition to the beginning of a file with method reposition.
d.
If it is necessary to read a sequential file again, the program can simply keep reading—when the end of the file is reached, the Scanner is automatically set to point back to the beginning of the file
What does the following statement do?
Scanner scanner = new Scanner(Paths.get(\"test.txt\"));
a.
Opens a binary file for output.
b.
Opens a text file for input.
c.
Opens a text file for output.
d.
Opens a binary file for input.
Class ________ provides static methods for common file and directory manipulations, including methods for copying files; creating and deleting files and directories; getting information about files and directories; reading the contents of files; getting objects that allow you to manipulate the contents of files and directories; and more.
a.
FilesAndDirectories
b.
Files
c.
File
d.
FileAndDirectory
| a. | The above statement is false—records in sequential files are usually updated in place. | |
| b. | the entire file is usually rewritten | |
| c. | the file is truncated | |
| d. | the updated data is placed in a “surrogate” fil | 
Solution
1.
Records in a sequential file are not usually updated in place. Instead the entire file is usually rewritten.
option b os correct choice.
2.
Class Scanner provides the ability to reposition to the beginning of a file with method seek.
The above statement is true.
Class Scanner provides the ability to reposition to the beginning of a file with method reposition.
The above statement is true.
3.
Opens a text file for input Scanner scanner = new Scanner(Paths.get(\"test.txt\"));
The above syntax refers to Opens a text file for input.
Option b is correct choice.
4.
class FilesAndDirectories provides static methods for common file and directory manipulations, including methods for copying files; creating and deleting files and directories; getting information about files and directories; reading the contents of files; getting objects that allow you to manipulate the contents of files and directories; and more.
Option a is correct choice.


