Exam 19: Streams and Binary Inputoutput
Exam 1: Introduction96 Questions
Exam 2: Fundamental Data Types103 Questions
Exam 3: Decisionseasy99 Questions
Exam 4: Loops100 Questions
Exam 5: Methods94 Questions
Exam 6: Arrays and Arraylists100 Questions
Exam 7: Inputoutput and Exception Handling100 Questions
Exam 8: Objects and Classes101 Questions
Exam 9: Inheritance and Interfaces99 Questions
Exam 10: Graphical User Interfaces54 Questions
Exam 11: Advanced User Interfaces91 Questions
Exam 12: Object-Oriented Design100 Questions
Exam 13: Recursion100 Questions
Exam 14: Sorting and Searching99 Questions
Exam 15: The Java Collections Framework100 Questions
Exam 16: Basic Data Structures94 Questions
Exam 17: Tree Structures100 Questions
Exam 18: Generic Classes78 Questions
Exam 19: Streams and Binary Inputoutput82 Questions
Exam 20: Multithreading82 Questions
Exam 21: Internet Networking74 Questions
Exam 22: Relational Databases75 Questions
Exam 23: XML74 Questions
Exam 24: Web Applications74 Questions
Select questions type
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");
(Multiple Choice)
4.8/5
(43)
If we read a byte and the value represents an international character equal to 133 using an InputStream object, what is true about the int value we will read?
(Multiple Choice)
4.9/5
(38)
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
(37)
If serializing object obj requires 12 bytes, how many bytes are required to serialize obj 3 times?
(Multiple Choice)
4.7/5
(32)
If you store information in binary form, as a sequence of bytes, you will use the ____ class(es) and their subclasses.
(Multiple Choice)
4.8/5
(38)
Which of the following statements enables you to write output to a text file?
(Multiple Choice)
4.8/5
(39)
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?
(Multiple Choice)
4.7/5
(33)
Every object is assigned a serial number on the stream. What might be the result if the same object is saved twice?
(Multiple Choice)
4.7/5
(31)
In which package are most classes for file processing found?
(Multiple Choice)
4.8/5
(28)
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.9/5
(37)
Which is not a method available in the RandomAccessFile class?
(Multiple Choice)
4.9/5
(28)
Which of these classes access sequences of characters?
I readers
II writers
III streams
(Multiple Choice)
4.7/5
(28)
Objects saved to an object stream must belong to classes that:
(Multiple Choice)
4.7/5
(43)
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)
4.9/5
(40)
Use a ____ object to access a file and move a file pointer.
(Multiple Choice)
4.7/5
(33)
How many bytes does the read method in the FileInputStream class actually return to the program call?
(Multiple Choice)
4.8/5
(35)
In Java, you use a(n) ____________ object to access a file and move its file pointer.
(Multiple Choice)
4.9/5
(39)
Showing 61 - 80 of 82
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)