Top Posters
Since Sunday
47
s
32
9
k
8
p
7
B
7
o
7
n
7
x
6
b
6
k
6
C
5
New Topic  
Coltonht Coltonht
wrote...
Posts: 419
2 years ago
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
Textbook 

Introduction to Java Programming, Comprehensive Version


Edition: 10th
Author:
Read 40 times
2 Replies
Replies
Answer verified by a subject expert
sarahlouhiggsarahlouhigg
wrote...
Posts: 399
2 years ago
Sign in or Sign up in seconds to unlock everything for free
More questions for this book are available here
4 bytes

Related Topics

wrote...
2 weeks ago
Thanks!
New Topic      
Explore
Post your homework questions and get free online help from our incredible volunteers
  251 People Browsing
 520 Signed Up Today
Related Images
  
 3180
  
 155
  
 76
Your Opinion
What's your favorite funny biology word?
Votes: 61