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 94 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


cassie_ragen

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

 

Did you know?

It is important to read food labels and choose foods with low cholesterol and saturated trans fat. You should limit saturated fat to no higher than 6% of daily calories.

Did you know?

Approximately one in three babies in the United States is now delivered by cesarean section. The number of cesarean sections in the United States has risen 46% since 1996.

Did you know?

Opium has influenced much of the world's most popular literature. The following authors were all opium users, of varying degrees: Lewis Carroll, Charles, Dickens, Arthur Conan Doyle, and Oscar Wilde.

Did you know?

More than 30% of American adults, and about 12% of children utilize health care approaches that were developed outside of conventional medicine.

Did you know?

Patients who have undergone chemotherapy for the treatment of cancer often complain of a lack of mental focus; memory loss; and a general diminution in abilities such as multitasking, attention span, and general mental agility.

For a complete list of videos, visit our video library