java 2 chapter 11 part 1
which of the following statements is true?
volatile storage is lost when a computer loses power
a collection of data stored on a nonvolatile device in a computer system?
file
a complete list of the disk drive plus the hierarchy of directories in which a file resides is its?
path
which of the following creates a Path named p to a FileStream named f?
Path p = f.getPath("C:\\Java\\MyFile.txt");
a path that needs no additional information to locate a file?
absolute path
the Path class getFileName( ) method returns?
the last item in a Path's list of name elements
which of the following statements always returns the same value as Files.exists(file)?
file.checkAccess( )
you cannot delete a Path: ?
if it represents a directory that is not empty
the data hierarchy occurs in the following order from the smallest to largest piece of data?
character, field, record, file
when records are accessed one after the other in the order in which they were stored, the file is being used as a _______ access file?
sequential
if you fail to close an input file:?
you might lose access to the written data
which of the following is true of streams?
streams are channels through which bytes flow
holds bytes that are scheduled for input or output?
buffer
InputStream is:?
an abstract class
Java's print( ) and println( ) methods are defined in the _______
class?
PrintStream
the newOutputStream( ) method
(all is true)
-is defined in the Files class
-creates a file if it does not already exist
-opens a file for writing
which of the following does the same thing as the BufferedWriter class newLine( ) method?
System.getProperty("line.separator")
which of the following systems is most likely to use batch processing?
payroll
real-time applications use ________?
random access files
a file channel is?
seekable