Question: Using DataOutputStream, write a Java program CreatePets1.java that will generate a binary file pets.dat that contains the same information as attached pets.txt but in binary
Using DataOutputStream, write a Java program CreatePets1.java that will generate a binary file pets.dat that contains the same information as attached pets.txt but in binary format.
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
Pets.txt
cat Fluffy Joan 2 false false orange dog Fido Elvis 10 poodle white other Screech Jane 1 false parrot cat Petey Nicholas 5 true false brown dog Spot Charlie 4 beagle black other Slytheryn Valdemort 20 true snake
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
