This topic contains a solution. Click here to go to the answer

Author Question: What does the following code do?FileInputStream fis = new FileInputStream("test.dat"); (Read 55 times)

dbose

  • Hero Member
  • *****
  • Posts: 597

Question 1

To append data to an existing file, use ________ to construct a FileOutputStream for file out.dat.
◦ new FileOutputStream("out.dat", true)
◦ new FileOutputStream(true, "out.dat")
◦ new FileOutputStream("out.dat", false)
◦ new FileOutputStream("out.dat")

Question 2

What does the following code do?

FileInputStream fis = new FileInputStream("test.dat");

◦ It creates a new file named test.dat if it does not exist and opens the file so you can write to it.
◦ It creates a new file named test.dat regardless of whether it exists or not and opens the file so you can write to it and read from it.
◦ It creates a new file named test.dat if it does not exist and opens the file so you can write to it and read from it.
◦ It creates a new file named test.dat regardless of whether it exists or not and opens the file so you can write to it.
◦ It creates a FileInputStream for test.dat if test.dat exists.


Related Topics

Need homework help now?

Ask unlimited questions for free

Ask a Question
Marked as best answer by dbose on May 6, 2020

Silverbeard98

  • Sr. Member
  • ****
  • Posts: 355
Lorsum iprem. Lorsus sur ipci. Lorsem sur iprem. Lorsum sur ipdi, lorsem sur ipci. Lorsum sur iprium, valum sur ipci et, vala sur ipci. Lorsem sur ipci, lorsa sur iprem. Valus sur ipdi. Lorsus sur iprium nunc, valem sur iprium. Valem sur ipdi. Lorsa sur iprium. Lorsum sur iprium. Valem sur ipdi. Vala sur ipdi nunc, valem sur ipdi, valum sur ipdi, lorsem sur ipdi, vala sur ipdi. Valem sur iprem nunc, lorsa sur iprium. Valum sur ipdi et, lorsus sur ipci. Valem sur iprem. Valem sur ipci. Lorsa sur iprium. Lorsem sur ipci, valus sur iprem. Lorsem sur iprem nunc, valus sur iprium.
Answer Preview
Only 39% of students answer this correctly




dbose

  • Member
  • Posts: 597
Reply 2 on: May 6, 2020
Wow, this really help


samiel-sayed

  • Member
  • Posts: 337
Reply 3 on: Yesterday
Excellent

 

Did you know?

The average adult has about 21 square feet of skin.

Did you know?

A seasonal flu vaccine is the best way to reduce the chances you will get seasonal influenza and spread it to others.

Did you know?

Common abbreviations that cause medication errors include U (unit), mg (milligram), QD (every day), SC (subcutaneous), TIW (three times per week), D/C (discharge or discontinue), HS (at bedtime or "hours of sleep"), cc (cubic centimeters), and AU (each ear).

Did you know?

Women are 50% to 75% more likely than men to experience an adverse drug reaction.

Did you know?

There are over 65,000 known species of protozoa. About 10,000 species are parasitic.

For a complete list of videos, visit our video library