If the data.dat file does not exist, what will happen when the following statement is executed? RandomAccessFile randomFile = new RandomAccessFile("data.dat", "rw") ;
A) An IOException will be thrown.
B) The file, data.dat, will be created.
C) A FileNotFoundException will be thrown.
D) A compiler error will occur.
Correct Answer:
Verified
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
Q53: If you want to append data to
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
Q59: If the code in a method can
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