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

Author Question: Which of the following statements is correct to create a DataOutputStream to write to a file named out.dat? (Read 91 times)

panfilo

  • Hero Member
  • *****
  • Posts: 572

Question 1

Which type of exception occurs when creating a DataInputStream for a nonexistent file?
◦ FileNotExistException
◦ FileNotFoundException
◦ FileNotFound
◦ FileNotExist

Question 2

Which of the following statements is correct to create a DataOutputStream to write to a file named out.dat?
◦ DataOutputStream outfile = new DataOutputStream(new FileOutputStream("out.dat"));
◦ DataOutputStream outfile = new DataOutputStream("out.dat");
◦ DataOutputStream outfile = new DataOutputStream(FileOutputStream("out.dat"));
◦ DataOutputStream outfile = new DataOutputStream(new File("out.dat"));


Related Topics

Need homework help now?

Ask unlimited questions for free

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

angrybirds13579

  • Sr. Member
  • ****
  • Posts: 344
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




panfilo

  • Member
  • Posts: 572
Reply 2 on: May 6, 2020
:D TYSM


aliotak

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

 

Did you know?

Approximately 70% of expectant mothers report experiencing some symptoms of morning sickness during the first trimester of pregnancy.

Did you know?

Your skin wrinkles if you stay in the bathtub a long time because the outermost layer of skin (which consists of dead keratin) swells when it absorbs water. It is tightly attached to the skin below it, so it compensates for the increased area by wrinkling. This happens to the hands and feet because they have the thickest layer of dead keratin cells.

Did you know?

Prostaglandins were first isolated from human semen in Sweden in the 1930s. They were so named because the researcher thought that they came from the prostate gland. In fact, prostaglandins exist and are synthesized in almost every cell of the body.

Did you know?

It is widely believed that giving a daily oral dose of aspirin to heart attack patients improves their chances of survival because the aspirin blocks the formation of new blood clots.

Did you know?

The effects of organophosphate poisoning are referred to by using the abbreviations “SLUD” or “SLUDGE,” It stands for: salivation, lacrimation, urination, defecation, GI upset, and emesis.

For a complete list of videos, visit our video library