If you want to append data to an existing binary file, BinaryFile.dat, which of the following statements would you use to open the file?
A) FileOutputStream fstream =
New FileOutputStream("BinaryFile.dat") ;
DataOutputStream binaryOutputFile =
New DataOutputStream(fstream) ;
B) FileOutputStream fstream =
New FileOutputStream("BinaryFile.dat", false) ;
DataOutputStream binaryOutputFile =
New DataOutputStream(fstream) ;
C) FileOutputStream fstream =
New FileOutputStream("BinaryFile.dat", true) ;
DataOutputStream binaryOutputFile =
New DataOutputStream(fstream) ;
D) IFileOutputStream fstream =
New FileOutputStream("BinaryFile.dat") ;
DataOutputStream binaryOutputFile =
New DataOutputStream(fstream, true) ;
Correct Answer:
Verified
Q48: What will be the result of the
Q49: In a catch statement, what does the
Q50: Assume that the classes BlankISBN, NegativePrice, and
Q51: What will be the result of the
Q52: Given the following constructor code, which of
Q54: If the data.dat file does not exist,
Q55: In Windows, which of the following statements
Q56: In the following code, assume that inputFile
Q57: The RandomAccessFile class treats a file as
Q58: What will the following code display? String
Unlock this Answer For Free Now!
View this answer and more for free by performing one of the following actions
Scan the QR code to install the App and get 2 free unlocks
Unlock quizzes for free by uploading documents