Exam 21: Advanced Input/Output

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

The readInt and writeInt methods of the RandomAccessFile class read and write integers as ____ quantities.

(Multiple Choice)
4.7/5
(37)

Objects saved to an object stream must belong to classes that ______________.

(Multiple Choice)
4.8/5
(35)

You cannot read a ____________________ file with a text editor.

(Multiple Choice)
4.9/5
(34)

The ______ method returns an integer, either -1 (at the end of the file) or a byte between 0 and 255.

(Multiple Choice)
5.0/5
(37)

In which package are the following types found: Path, Paths, Files?

(Multiple Choice)
4.7/5
(45)

Which file storage method stores data in bytes?

(Multiple Choice)
5.0/5
(40)

Which file storage method is in human-readable form?

(Multiple Choice)
4.9/5
(34)

Assume we have a RandomAccessFile object, file, which 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 25th record, which code correctly modifies the 25th record by changing its color to Color.yellow through the setColor method?

(Multiple Choice)
4.9/5
(42)

Which of the following is NOT a method of the Files class?

(Multiple Choice)
4.9/5
(28)

Why does FileInputStream override the read method from its superclass InputStream?

(Multiple Choice)
4.8/5
(38)

Which code stores an array studentArray of Student objects in a file named studentFile.bin? We ignore exceptions in this problem.

(Multiple Choice)
4.7/5
(29)

Which expression returns a String representing the full path to the file filename.txt?

(Multiple Choice)
4.7/5
(40)

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

(Multiple Choice)
4.8/5
(39)

Which class is used for output of binary data?

(Multiple Choice)
4.9/5
(40)

You would need a Caesar cipher with a shift of __________ to decrypt the text T U V W X Y Z A B C D E F G H I J K L M N O P Q R S so that it reads A B C D E F G H I J K L M N O P Q R S T U V W X Y Z.

(Multiple Choice)
4.9/5
(36)

Which statement about object streams is NOT correct?

(Multiple Choice)
4.9/5
(33)

Readers and writers access sequences of ____.

(Multiple Choice)
4.8/5
(38)

Fill in the blank in the following code snippet. ______ myVariable = Paths.get("filename.txt");

(Multiple Choice)
4.8/5
(31)

Which method moves the file pointer in a RandomAccessFile?

(Multiple Choice)
4.9/5
(36)

If you write a simple Student class, what must you do in order to write Student objects to an ObjectOutputStream?

(Multiple Choice)
4.8/5
(44)
Showing 41 - 60 of 90
close modal

Filters

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