Solved

Assume We Have a RandomAccessFile Object, File, Which Stores a Set

Question 31

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:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions