Java How to Program, 11/e Multiple Choice Test Bank 4 of 7
b. Opens a binary file for output.
c. Opens a text file for input.
d. Opens a text file for output.
15.4.3 Case Study: A Credit-Inquiry Program
15.4.3 Q1: 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 provides the ability to reposition to the beginning of a file with method
reposition.
c. Class Scanner does not provide the ability to reposition to the beginning of the file.
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.
15.4.4 Updating Sequential Files
15.4.4 Q1: Records in a sequential file are not usually updated in place. Instead
________.
a. the updated data is placed in a “surrogate” file
b. the entire file is usually rewritten
c. the file is truncated
d. The above statement is false—records in sequential files are usually updated in place.
15.5 XML Serialization
15.5 Q1: Which of the following is false?
a. JAXB (Java Architecture for XML Binding) enables you to perform XML
serialization.
b. Marshaling is the process of deserializing an object.
c. A serialized object is represented by XML that includes the object’s data.
d. XML (eXtensible Markup Language) is a widely used language for describing data.
15.5 Q2: A serialized object is ________.
a. an object represented by XML that includes the object’s data.
b. an object in memory that has been recreated from data in a file
c. a standard output stream object used to convert objects in code to data in a file