Multiple Choice
Assume we have a RandomAccessFile object, file, which stores a set of records of class MyData, each needing MyData.RECORD_SIZE bytes for storage. Which expression calculates the number of records in the file?
A) MyData.RECORD_SIZE * file.length()
B) MyData.RECORD_SIZE + file.getFilePointer()
C) file.seek(0L) / MyData.RECORD_SIZE
D) file.length() / MyData.RECORD_SIZE
Correct Answer:

Verified
Correct Answer:
Verified
Q26: If you write a simple Student class,
Q27: If you store information in binary form,
Q28: In Java, the byte type is a(n)
Q29: If we read a byte and the
Q30: In Java, you use a(n) _ object
Q32: The values of the byte type range
Q33: Every object is assigned a serial number
Q34: What is returned by the read method
Q35: Which code moves the file pointer to
Q36: What type is returned from a call