Cyber Monday 2024! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Oracle Exam 1Z0-809 Topic 7 Question 58 Discussion

Actual exam question for Oracle's 1Z0-809 exam
Question #: 58
Topic #: 7
[All 1Z0-809 Questions]

Given that dat

a.txt and alldata.txt are accessible, and the code fragment:

What is required at line n1 to enable the code to overwrite alldata.txt with data.txt?

Show Suggested Answer Hide Answer
Suggested Answer: D

Contribute your Thoughts:

Elin
5 months ago
I'm not sure, but I think both A) and D) are necessary to ensure that the data is written correctly to alldata.txt.
upvoted 0 times
...
Graciela
5 months ago
I disagree, I believe the answer is A) br.close() because we need to close the BufferedReader before writing to the file.
upvoted 0 times
...
Lura
5 months ago
I think the answer is D) bw.flush() because it will flush the contents of the BufferedWriter to the file.
upvoted 0 times
...
Frederica
6 months ago
I think B) bw.writeln() is also a valid option, as writing a line to the BufferedWriter could also overwrite the file.
upvoted 0 times
...
Lai
6 months ago
Nieves, the question is about overwriting the file, so flushing the BufferedWriter makes more sense.
upvoted 0 times
...
Nieves
6 months ago
I'm not sure, but I think A) br.close() would be needed to close the BufferedReader.
upvoted 0 times
...
Marquetta
7 months ago
I agree with Lai, because flushing the BufferedWriter will write the data to the file.
upvoted 0 times
...
Lai
7 months ago
I think the correct answer is D) bw.flush().
upvoted 0 times
...

Save Cancel
az-700  pass4success  az-104  200-301  200-201  cissp  350-401  350-201  350-501  350-601  350-801  350-901  az-720  az-305  pl-300  

Warning: Cannot modify header information - headers already sent by (output started at /pass.php:70) in /pass.php on line 77