Chapter 11 Flashcards

1
Q

____________ is lost when a computer loses power.

A

Volatile storage

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

A collection of data stores in a nonvolatile device in a computer system is a

A

File

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

A complete list of the disk drive plus the hierarchy of directories in which a file resides is its

A

Path

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What does Path p = f.getPath(“C\Java\MyFile.txt”); do?

A

Creates a Path named p to a FileStream named f

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

A path that needs no additional information to locate a file is

A

Absolute path

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

The Path class getFileName() method returns

A

The last item in a Path’s list of name elements

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

File.checkAccess() always returns the same value as

A

File.exists(file)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

You cannot delete a Path

A

If it represents a directory that is not empty

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

The data hierarchy occurs in the following order from smallest to largest piece of data

A

Character, field, record, file

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

When records are accessed one after the other in the order in which they were stored, their file is being used as a _________ access file.

A

Sequential

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

If you fail to close an output file,

A

You might lose access to the written data

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Streams are channels through which _______ flow

A

bytes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

A buffer

A

Holds bytes that are scheduled for input or output

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

InputStream is

A

An abstract class

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Java’s print() and println() methods are defined in the ______ class

A

PrintStream

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

The newOutputStream() method

A

Creates a file if it does not already exist

17
Q

__________ does the same thing as BufferedWriter class newLine() method.

A

System.getProperty (“line.separator”)

18
Q

What would use batch processing

A

A payroll system

19
Q

Real-time applications

A

Use random access files

20
Q

A file channel

A

Is seekable