After the following program is finished, how many bytes are written to the file t.dat?

```
import java.io.*;

public class Test {
public static void main(String[] args) throws IOException {
DataOutputStream output = new DataOutputStream(
new FileOutputStream("t.dat"));
output.writeShort(1234);
output.writeShort(5678);
output.close();
}
}
```
a. 2 bytes.
b. 4 bytes.
c. 8 bytes.
d. 16 bytes.


b. 4 bytes.

Computer Science & Information Technology

You might also like to view...

To complete a custom calculation, you need to create a(n) ____________________ field in the design grid.

Fill in the blank(s) with the appropriate word(s).

Computer Science & Information Technology

When emailing, how many topics should you limit each individual email to?

a. no more than 3 b. only 1 c. any number is fine as long as you explain each one in detail d. it depends on the recipient

Computer Science & Information Technology

Try rewriting Program 100 so that you have a linear increase in volume to halfway through the sound, then linearly decrease the volume down to zero in the second half.

What will be an ideal response?

Computer Science & Information Technology

____________________ (CGI) scripts are used to generate a dynamic Web page's contents and can be written in a number of programming languages, such as Java, C, and Perl.

Fill in the blank(s) with the appropriate word(s).

Computer Science & Information Technology