Top Posters
Since Sunday
5
o
5
4
m
4
b
4
x
4
a
4
l
4
t
4
S
4
m
3
s
3
New Topic  
Coltonht Coltonht
wrote...
Posts: 430
3 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

Introduction to Java Programming, Comprehensive Version


Edition: 10th
Author:
Read 84 times
1 Reply
Replies
Answer verified by a subject expert
sarahlouhiggsarahlouhigg
wrote...
Posts: 399
3 years ago
Sign in or Sign up in seconds to unlock everything for free
More solutions for this book are available here

Related Topics

Coltonht Author
wrote...

3 years ago
Thanks
wrote...

Yesterday
Brilliant
wrote...

2 hours ago
Helped a lot
New Topic      
Explore
Post your homework questions and get free online help from our incredible volunteers
  1099 People Browsing
Related Images
  
 666
  
 4416
  
 611
Your Opinion
Which 'study break' activity do you find most distracting?
Votes: 741