What does the following code do?

FileInputStream fis = new FileInputStream("test.dat");
a. It creates a new file named test.dat if it does not exist and opens the file so you can write to it.
b. It creates a new file named test.dat if it does not exist and opens the file so you can write to it and read from it.
c. It creates a new file named test.dat regardless of whether it exists or not and opens the file so you can write to it.
d. It creates a new file named test.dat regardless of whether it exists or not and opens the file so you can write to it and read from it.
e. It creates a FileInputStream for test.dat if test.dat exists.


e. It creates a FileInputStream for test.dat if test.dat exists.

Computer Science & Information Technology

You might also like to view...

which for loop will cycle through each value correctly and assign the values: 1, 2, 3, 4, 5, 6, 7, 8 ?

Given the array: int hours[8]; A. for(int i=0; i<8; ++i);{ hours[i] = i; } B. for(int i=0; i<8; ++i){ hours[i+1] = i; } C. for(int i=0; i<8; ++i){ hours[i] = i + 1; } D. for(int i=0; i<7; ++i){ hours[i] = i + 1; }

Computer Science & Information Technology

What are the three elements of the exposure triangle?

What will be an ideal response?

Computer Science & Information Technology

What statement regarding the use of TCP and UDP is accurate?

A. The TCP protocol is a connection-oriented communication because it ensures delivery of data. B. TCP utilizes a smaller frame with less header information than UDP. C. UDP is typically used when reliability of the communication is critical. D. UDP uses a constantly adjusting window size to account for existing network traffic.

Computer Science & Information Technology

Does a qualified opinion on management's assessment of internal controls over the financial reporting system necessitate a qualified opinion on the financial statements? Explain.

What will be an ideal response?

Computer Science & Information Technology