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 Each short number takes 2 bytes. So total is 4 bytes.

Computer Science & Information Technology

You might also like to view...

The larger the file size of a graphic, the faster it will load in a browser.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology

By default, slides in a new presentation are in ____ orientation.

A. right to left B. landscape C. top to bottom D. portrait

Computer Science & Information Technology

Match the following data types to their meanings:

I. AutoNumber II. Currency III. Number IV. Short Text A. Describes numbers that are not used in calculations B. Represents a quantity of how much, or how many, and may be used in calculations C. Describes a unique sequential or random number assigned by Access as each record is entered D. Describes monetary values and numeric data that can be used in calculations

Computer Science & Information Technology

The _________ searches a table for redundant data and suggests how to split the table into two or more related tables

Fill in the blank(s) with correct word

Computer Science & Information Technology