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 58 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!


Chelseyj.hasty

  • Member
  • Posts: 319
Reply 3 on: Yesterday
Thanks for the timely response, appreciate it

 

Did you know?

Not getting enough sleep can greatly weaken the immune system. Lack of sleep makes you more likely to catch a cold, or more difficult to fight off an infection.

Did you know?

Children of people with alcoholism are more inclined to drink alcohol or use hard drugs. In fact, they are 400 times more likely to use hard drugs than those who do not have a family history of alcohol addiction.

Did you know?

More than one-third of adult Americans are obese. Diseases that kill the largest number of people annually, such as heart disease, cancer, diabetes, stroke, and hypertension, can be attributed to diet.

Did you know?

Though Candida and Aspergillus species are the most common fungal pathogens causing invasive fungal disease in the immunocompromised, infections due to previously uncommon hyaline and dematiaceous filamentous fungi are occurring more often today. Rare fungal infections, once accurately diagnosed, may require surgical debridement, immunotherapy, and newer antifungals used singly or in combination with older antifungals, on a case-by-case basis.

Did you know?

Most childhood vaccines are 90–99% effective in preventing disease. Side effects are rarely serious.

For a complete list of videos, visit our video library