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
Thanks for the timely response, appreciate it


steff9894

  • Member
  • Posts: 337
Reply 3 on: Yesterday
Great answer, keep it coming :)

 

Did you know?

Approximately one in four people diagnosed with diabetes will develop foot problems. Of these, about one-third will require lower extremity amputation.

Did you know?

Blood in the urine can be a sign of a kidney stone, glomerulonephritis, or other kidney problems.

Did you know?

According to the National Institute of Environmental Health Sciences, lung disease is the third leading killer in the United States, responsible for one in seven deaths. It is the leading cause of death among infants under the age of one year.

Did you know?

This year, an estimated 1.4 million Americans will have a new or recurrent heart attack.

Did you know?

The modern decimal position system was the invention of the Hindus (around 800 AD), involving the placing of numerals to indicate their value (units, tens, hundreds, and so on).

For a complete list of videos, visit our video library