Biology Forums - Study Force

Science-Related Homework Help Computer Studies Topic started by: Coltonht on May 5, 2020



Title: After the following program is finished, how many bytes are written to the file t.dat?import ...
Post by: Coltonht on May 5, 2020
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();
}
}


▸ 16 bytes

▸ 8 bytes

▸ 2 bytes

▸ 4 bytes


Title: After the following program is finished, how many bytes are written to the file t.dat?import ...
Post by: sarahlouhigg on May 5, 2020
Content hidden