| 4. |
A DataOutputStream writes a record using out.writeInt(42); out.writeDouble(3.5); in that order. Which sequence correctly reads the record using a DataInputStream named in? Assume the stream is positioned at the record's start and IOException is handled or declared.
Please select the correct answer:
|
| |
A.
|
double value = in.readDouble(); int count = in.readInt(); |
| |
B.
|
int count = in.readInt(); double value = in.readDouble(); |
| |
C.
|
int count = in.read(); double value = in.read(); |