Exam 20: Streams and Binary Inputoutput
Exam 1: Introduction98 Questions
Exam 2: Using Objects76 Questions
Exam 3: Implementing Classes103 Questions
Exam 4: Fundamental Data Types125 Questions
Exam 5: Decisions120 Questions
Exam 6: Loops128 Questions
Exam 7: Arrays and Array Lists118 Questions
Exam 8: Designing Classes95 Questions
Exam 9: Inheritance101 Questions
Exam 10: Interfaces85 Questions
Exam 11: Inputoutput and Exception Handling109 Questions
Exam 12: Object-Oriented Design104 Questions
Exam 13: Recursion110 Questions
Exam 14: Sorting and Searching109 Questions
Exam 15: The Java Collections Framework110 Questions
Exam 16: Basic Data Structures104 Questions
Exam 17: Tree Structures110 Questions
Exam 18: Generic Classes75 Questions
Exam 19: Graphical User Interfaces76 Questions
Exam 20: Streams and Binary Inputoutput82 Questions
Exam 21: Multithreading82 Questions
Exam 22: Internet Networking74 Questions
Exam 23: Relational Databases75 Questions
Exam 24: XML74 Questions
Exam 25: Web Applications75 Questions
Select questions type
Use a ____ object to access a file and move a file pointer.
(Multiple Choice)
4.8/5
(42)
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)
5.0/5
(41)
A byte is composed of ____ bits and can denote ____ values.
(Multiple Choice)
4.9/5
(35)
Which is not a method available in the RandomAccessFile class?
(Multiple Choice)
4.8/5
(35)
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 picture for a key = -3?
(Multiple Choice)
4.9/5
(43)
If you write a simple Student class, what must you do in order to write Student objects to an ObjectOutputStream?
(Multiple Choice)
4.8/5
(39)
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
(33)
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
(34)
In Java, you use a(n) ____________ object to access a file and move its file pointer.
(Multiple Choice)
5.0/5
(38)
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.9/5
(38)
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.8/5
(38)
What is returned by the read method when a FileInputStream has reached the end of the file?
(Multiple Choice)
4.9/5
(43)
Which code moves the file pointer to the middle of a RandomAccessFile object, file?
(Multiple Choice)
4.8/5
(38)
What type is returned from a call to the ObjectInputStream.readObject method when reading a String from an object stream?
(Multiple Choice)
4.8/5
(39)
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. For the encrypt method below, select the correct body. Assume the key shift property is accessible to the method. public int encrypt(int B) { __________ }
(Multiple Choice)
4.8/5
(35)
In Java, the simplest mechanism for reading text is to use the ____ class.
(Multiple Choice)
4.9/5
(31)
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.9/5
(27)
Showing 21 - 40 of 82
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)