QUESTIONS WITH DETAILED VERIFIED ANSWERS;
ALREADY GRADED A; 2025
Some text files are ____ files that contain facts and figures, such as a payroll file that contains
employee numbers, names, and salaries.
a. Application
b. Volatile
c. data
d. program - ANS-data
Placing a file in the ____ directory of your storage device is equivalent to tossing a loose
document into a drawer.
a. root
b. path
c. back
d. loose - ANS-root
You can use Java's ____ class to create objects that contain information about files or
directories, such as their locations, sizes, creation dates, and whether they even exist.
a. Directory
b. Property
c. Path
d. File - ANS-path
FileSystems is a class that contains ____ methods, which assist in object creation.
a. factory
b. file
c. abstract
d. system - ANS-factory
After you create a FileSystem object, you can define a Path using the ____ method with it.
a. getPath()
b. createPath()
, c. setPath()
d. getDefault() - ANS-getPath()
A ____ is a group of characters that has some meaning.
a. record
b. file
c. byte
d. field - ANS-field
A data file can be used as a(n) ____ file when each record is accessed one after another in the order in
which it was stored.
a. Application
b. sequential
c. accessstream
d. field - ANS-sequential
InputStream and OutputStream are subclasses of the ____ class.
a. IO
b. Object
c. Stream
d. IOStream - ANS-Object
__________ is an abstract class for reading character streams.
a. System.out
b. Reader
c. System.err
d. OutStream - ANS-Reader
Java lets you assign a file to a(n) ____ object so that screen output and file output work in
exactly the same manner.
a. Stream
b. Input
c. Output
d. File - ANS-Stream
You can create a writeable file by using the Files class ____ method.
a. getOutputStream()
b. newOutputStream()
c. newFileOutputStream()
d. fileOutputStream() - ANS-newOutputStream()
When you use the BufferedReader class, you must import the ____ package into your program.
a. java.nio.file
b. java.io
c. java.nio
d. java.io.input - ANS-java.io
The BufferedWriter class contains a ____ method that uses the current platform's line