Exam 20: Streams and Binary Inputoutput

arrow
  • Select Tags
search iconSearch Question
flashcardsStudy Flashcards
  • Select Tags

Objects saved to an object stream must belong to classes that:

(Multiple Choice)
4.9/5
(31)

Caesar cipher uses a shift of each character by a key with a value between 1 and 255. An a with a shift equal to 3 becomes a d. A z would become a c, wrapping around the alphabet. Which is the encryption of shadow for a key = 3?

(Multiple Choice)
5.0/5
(42)

How many methods are required to implement the Serializable interface?

(Multiple Choice)
4.9/5
(37)

What do we call the measure in bytes of the file pointer from the beginning of a RandomAccessFile?

(Multiple Choice)
4.9/5
(32)

Readers and writers access sequences of ____.

(Multiple Choice)
4.8/5
(36)

If we want to write objects to a file, what type of object should be passed to the ObjectOutputStream constructor?

(Multiple Choice)
4.7/5
(44)

In ____________ file access, the file is processed starting from the beginning.

(Multiple Choice)
4.8/5
(44)

When constructing a Scanner from a File object, the Scanner automatically constructs a ___________.

(Multiple Choice)
4.8/5
(28)

Which methods are not in the Serializable interface? I readObject II writeObject III serializeObject

(Multiple Choice)
4.7/5
(35)

Assume we have a RandomAccessFile object, file, that stores a set of records of class MyData. The size of each record is MyData.RECORD_SIZE. Assume MyData has read and write methods both of which take a RandomAccessFile as an argument. Method write writes the object at the current location. Method read reads the record from current location of the file into the object. If we are currently at the beginning of the 1st record, which code correctly modifies the 2nd record by changing its color to Color.red through the setColor method?

(Multiple Choice)
4.8/5
(44)

Caesar cipher uses a shift of each character by a key with a value between 1 and 255. An a with a shift equal to 3 becomes a d. A z would become a c, wrapping around the alphabet. Which key should you use to encrypt picture into mfzqrob?

(Multiple Choice)
4.9/5
(31)

In text format, data items are represented in human-readable form, as a sequence of ____________________.

(Multiple Choice)
4.8/5
(49)

Which class is used for input of binary data?

(Multiple Choice)
4.8/5
(37)

How many bytes does the read method in the InputStream class actually return to the program call?

(Multiple Choice)
4.9/5
(37)

Which is an advantage of storing numbers in binary format? I fast access II less storage needed III easy to read in a text editor

(Multiple Choice)
4.9/5
(37)

The readDouble and writeDouble methods of the RandomAccessFile class, process double precision floating-point numbers as ____ quantities.

(Multiple Choice)
4.8/5
(30)

When storing numbers in a file with fixed record sizes, it is easier to store them in __________ format.

(Multiple Choice)
4.8/5
(35)

To read text data from a disk file, you should create a(n) ____________________ object.

(Multiple Choice)
4.8/5
(42)

Which class is used for input of text data from a file?

(Multiple Choice)
4.7/5
(26)

A file pointer is a position in a random access file. Because files can be very large, the file pointer is of type _______.

(Multiple Choice)
4.8/5
(35)
Showing 41 - 60 of 82
close modal

Filters

  • Essay(0)
  • Multiple Choice(0)
  • Short Answer(0)
  • True False(0)
  • Matching(0)