Services
Discover
Homeschooling
Ask a Question
Log in
Sign up
Filters
Done
Question type:
Essay
Multiple Choice
Short Answer
True False
Matching
Topic
Computing
Study Set
Big Java Early Objects
Quiz 21: Advanced Input/Output
Path 4
Access For Free
Share
All types
Filters
Study Flashcards
Practice Exam
Learn
Question 41
Multiple Choice
In which of the following modes can a RandomAccessFile be opened? i.r II.rw III.w
Question 42
Multiple Choice
Which code moves the file pointer to the middle of a RandomAccessFile object, file?
Question 43
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.If the file pointer is currently on the 24th record, which expression represents the offset to the beginning of the 25th record?
Question 44
Multiple Choice
Given a RandomAccessFile that stores a set of records of class MyData, each needing MyData.RECORD_SIZE bytes for storage, which expression gets the offset to the beginning of the 25th record?
Question 45
Multiple Choice
Which of the following classes are used with data in binary form? i.FileInputStream II.FileReader III.RandomAccessFile
Question 46
Multiple Choice
Which is NOT a method in the RandomAccessFile class?
Question 47
Multiple Choice
__________ access allows file access at arbitrary locations, without first reading the bytes preceding the access location.
Question 48
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?
Question 49
Multiple Choice
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?
Question 50
Multiple Choice
A file pointer is a position in a random access file.Because files can be very large, the file pointer is of type _______.
Question 51
Multiple Choice
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?
Question 52
Multiple Choice
Which method in the RandomAccessFile class provides for random access?
Question 53
Multiple Choice
Based on the code below, the statement that would move the file pointer to byte n counted from the beginning of the file is ___________________. RandomAccessFile test = new RandomAccessFile("record.bat", "r") ;