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
When constructing a Scanner from a File object, the Scanner automatically constructs a ___________.
Free
(Multiple Choice)
4.8/5
(38)
Correct Answer:
C
The ____ class is used when writing text files.
Free
(Multiple Choice)
4.8/5
(40)
Correct Answer:
A
The two IO classes used for serialization are _______ and ________.
Free
(Multiple Choice)
4.9/5
(43)
Correct Answer:
B
Which interface allows classes to be written to an ObjectOutputStream?
(Multiple Choice)
4.8/5
(36)
Which of the following cannot be serialized?
I ArrayList<String>
II String
III Integer
(Multiple Choice)
4.8/5
(37)
__________ access allows file access at arbitrary locations, without first reading the bytes preceding the access location.
(Multiple Choice)
4.8/5
(34)
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 key should you use to encrypt picture into mfzqrob?
(Multiple Choice)
4.8/5
(41)
How many methods are required to implement the Serializable interface?
(Multiple Choice)
4.8/5
(45)
The readInt and writeInt methods of the RandomAccessFile class read and write integers as ____ quantities.
(Multiple Choice)
4.7/5
(39)
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?
(Multiple Choice)
4.9/5
(33)
Which is an advantage of storing numbers in binary format?
I fast access
II less storage needed
III easy to read in a text editor
(Multiple Choice)
4.8/5
(37)
How many bytes does the read method in the InputStream class get from the file?
(Multiple Choice)
5.0/5
(28)
In which of the following modes can a RandomAccessFiles be opened?
I "r"
II "rw"
III "w"
(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
(32)
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 decryption of exmmv for a key = -3?
(Multiple Choice)
4.8/5
(33)
Which statement is true regarding the following code, assuming reader is a FileInputStream object?
Char ch = (char) reader.read();
I you cannot determine if you have reached the end of input
II this code will throw an exception if we are at the end of input
III read returns an int, so the cast is illegal
(Multiple Choice)
4.8/5
(36)
Showing 1 - 20 of 82
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)