Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.io.*;
- class Write
- {
- public static void main(String[] args) throws Exception
- {
- File file = new File("temp.test");
- FileOutputStream stream = new FileOutputStream(file);
- // write integers here. . .
- }
- }
- Choices:
- a. DataOutputStream filter = new DataOutputStream(stream);
- for (int i = 0; i < 10; i++)
- {
- filter.writeInt(i);
- }
- b. for (int i = 0; i < 10; i++)
- {
- file.writeInt(i);
- }
- c. for (int i = 0; i < 10; i++)
- {
- stream.writeInt(i);
- }
- d. DataOutputStream filter = new DataOutputStream(stream);
- for (int i = 0; i < 10; i++)
- {
- filter.write(i);
- }
- e. for (int i = 0; i < 10; i++)
- {
- stream.write(i);
- }
Advertisement
Add Comment
Please, Sign In to add comment