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 54 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
Gracias!


mochi09

  • Member
  • Posts: 335
Reply 3 on: Yesterday
Wow, this really help

 

Did you know?

The familiar sounds of your heart are made by the heart's valves as they open and close.

Did you know?

To maintain good kidney function, you should drink at least 3 quarts of water daily. Water dilutes urine and helps prevent concentrations of salts and minerals that can lead to kidney stone formation. Chronic dehydration is a major contributor to the development of kidney stones.

Did you know?

Thyroid conditions cause a higher risk of fibromyalgia and chronic fatigue syndrome.

Did you know?

Although the Roman numeral for the number 4 has always been taught to have been "IV," according to historians, the ancient Romans probably used "IIII" most of the time. This is partially backed up by the fact that early grandfather clocks displayed IIII for the number 4 instead of IV. Early clockmakers apparently thought that the IIII balanced out the VIII (used for the number 8) on the clock face and that it just looked better.

Did you know?

It is difficult to obtain enough calcium without consuming milk or other dairy foods.

For a complete list of videos, visit our video library